If the table headers are are actually stored as headers, you can access them as %DataTable.Columns% (will return the names of the columns in a list variable) or %DataTable.ColumnHeadersRow% (will return the names of the columns in a datarow variable). You can then iterate through them using a loop or a For each.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.