Hi @Abhi1223 ,
I made a sample for you:
Create a library in sharepoint, includes two folders and an excel for getting changes information.

Create a flow, and I will explain it step by step.

Add a trigger that fires when a file is created or modified in the library.
Because Excel is also in the library, need to set the trigger condition to avoid the flow being triggered by a loop.

The condition is set to the following formula, when the modified file is excel file that used to capture the changes, the flow is not triggered.
@not(equals(triggerOutputs()?['body/{Name}'], 'Excel File Name'))

Get the folder name of the modified file by the folder path.

Add row into the excel table with ‘Folder Name’ from the dynamic content of the action 'Get folder metadata using path'.

The other three columns from the dynamic content of the trigger 'When a file is created or modified (properties only)'.

Save and run flow. Modify File1 in Folder1.

Excel add a new row.

Best Regards,
Wearsky