Power Automate: How to get more than 5000 SharePoint Items
If you are using the ‘Get Files’ action in Power Automate, you will notice that you cannot query more than 5000 items in one batch.
There are a number of ways to overcome this issue. For example, you could add the Filter Query to narrow down the search list or enable Pagination and set the Threshold so you can retrieve more items. However, both methods have quite obvious pros and cons. The Filter Query may not always apply, and enabling Pagination can significantly decrease performance, even causing timeouts.

I tried a different approach to overcome this limit. In my case, I have a Dynamics 365 environment integrated with SharePoint Online, hence I can easily retrieve the ‘Folder Name’ by searching the sharepointdocumentlocation table in Dataverse for the relativeurl field.
After that, I can call the SharePoint REST API (GetFolderByServerRelativeUrl) to retrieve the files I need, along with their respective attributes.

This method only works if you know the folder name. Depending on your system setup, you might use other methods to retrieve the folder name. Overall, finding the folder name should be relatively easier compared to overcoming the 5000 limit from the SharePoint Get Files action.
Hope this helps!