Here’s a little video I made about the permissions that Google asks for when you first try to run a sheet.
The sheets are safe to run, all the code can be seen by going to “extensions” -> “apps scripts”. So its safer than most programs you would download of the internet as you can actually see all the code before running it.
If you are still unsure you can also paste the code in to chatgpt and ask if it is safe, or create a separate Google account for running the code.