Your issue likely lies on the SharePoint side. Verify your Flow connecting to a SharePoint List is utilizing a custom view that shows all of the columns that are needed for both the list, and for the file generation. Also, verify that the credentials being used in the flow have access to both the List and Document Library.
For SharePoint lists, the When an item is created trigger has an optional paprameter called Limit Columns by View, which you may want to look into (see documentation).
An additional troubleshooting step you can perform is to compare the columns required for the files that generate, and the files that fail to generate.
Finally, if the files you are generating are large in size, it may take some time to generate the files and the flows are moving forward before they can finish creating the files - so you may need to put delay steps.