How to delete a file once it is created by an app?
Monitoring a directory for a newly created or modified file is a simple task for an app as Android provides an API for doing so. 

Therefore a lot of apps include file monitoring capabilities, such as Automate or Tasker. In these apps you can monitor the file as add a trigger to delete the file that will be executed immediately when the file is created.