I have created a cloud flow having a „For a selected item“ trigger on a SharePoint list. As a calling parameter a csv file could be uploaded.

When the csv file for example is edited with Excel and not saved as MSDOS csv file, we get the UTF-8 BOM descriptor at the beginning. Using this in a Compose action:
base64ToString(triggerBody()?['file']?['contentBytes'])
results in (only visible in „Show raw outputs“:

To remove this BOM called three characters you can use:
replace(base64ToString(triggerBody()?['file']?['contentBytes']),uriComponentToString('%EF%BB%BF'),'')
The result:

I found this solution here: