@EvaSantos You need to add the script in Excel via the Automate tab.

You might be interested in this YT Tutorial: ✌️TWO WAYS to Get Data from Excel into a SharePoint List
There are two ways to get your data from Excel into a SharePoint List:
1️⃣ Copy and paste
2️⃣ Automatically with a Power Automate flow
In this video tutorial I will show you how to get your Excel data into a SharePoint List using the two methods listed above. I’ll cover how to format your data for complex columns such as a multi-choice and multi-person columns.
---
IN THIS VIDEO:
✅How to copy and paste data from Excel into a SharePoint List
✅How to format Excel data for multi-choice columns in a SharePoint List
✅How to import data from Excel into a SharePoint List with a Power Automate Flow
✅How to use the Select action in Power Automate
✅How to use the Create Item action in Power Automate
✅Enabling the Concurrency Control to Optimize Flow Performance
Hope this helps!