In my SharePoint online environment, I can select “When a new file is added in SharePoint, complete the custom action”. Then you can trigger the flow only when a file is created.
You also could create workflow for the document library to trigger your actions in SharePoint designer 2013. You could create two workflows. One workflow can be triggered when a file is created. And the other workflow can be triggered when a file is updated.
In the workflow settings, in the start options, you can select “Start workflow automatically when an item is created” in one workflow. Then the workflow will be triggered when a file is created.
And you can select “Start workflow automatically when an item is changed” in the other workflow.
The two workflows will be triggered by different conditions.
Creating a workflow by using SharePoint Designer 2013 and the SharePoint Workflow platform.