I am making a game that involves the score of the player. This score is always displayed on the screen. However when i change scenes the score resets back to 0. How can i make it so that the score gets saved across all of my scenes?

I have looked on the internet for hours but i was not able to fix it that way. The 2 main things that i came across were this:

1. Static variables
2. DontDestroyOnLoad()

While i am sure that these would fix my issue, i have no idea how to implement them in my code. Do i make a new script? Do i put them in an existing script? And if so, which one? How can call upon variables if they are static?

Thanks in advance for any help!