Hi @Umeriqbal01
for better understanding, let me explain with an example:
assume i want to write first two columns of sharepoint list to excel file

I should create a excel file template having header name like below

Now let's look at flow design
1. Get items from SharePoint
2. initialize a variable of datatable like below

The ['EventID', 'Event Subject'] represent headers in my case, you can add as per your header names.
Now iterate through value component of your get items output like below

The value of GetItems Response is like below , which has an array having item data.

if you notice, i have renamed Title Column to Event ID Column, but internal name of column remains same as Title itself.
Now see how should i extract indiviual values /properties for each element in array

here CurrentItem represent each element in array and each element in array has multiple properties which we need to extract, so in my case, i have get Title and Event Subject property value which i have extracted using CurrentItem['Title'] and CurrentItem['EventSubject'] which i am concatenating to datatable using set variable action.
Now finally write the datatable to excel file starting from A2 cell.

Results

Hope it helps !