Is it really tempting for people? They've given me too many headaches when I've had to reformat or add functionality to files.
Unless it's a simple single use script that fit on the computer screen, I don't feel like global variables would ever be tempting, unless it's for constants.
You can do better, define intergalactic variables that share the same memory location across multiple programs so you can seamlessly pass variables from one to the next.
I've once had a course involving programming and the lecturer rewrote the code, which we were usually using at our institute, making ALL variables global. - Yes, also each and every loop counter and iterator. 🤪
I am not a programmer who knows how to program. I know this because global variables are how I fix most the issue I run into, but are constantly told this wrong.