How do i make a script that runs all time across different scenes

For example if i have scene with a character that has a specifed amount of hp and then when it swithces to another scene/next level i want it to have the same amount of hp as before. Is it possible to make some kind of script that run all time between all scenes?

PlayerPrefs

You can search there are more tutorials and thread on it…
so at this point i link the first video i found it can be useful… there are too ScriptableObject if you don’t know what are it’s a good resource to put in your luggage

This is a very common pattern named the “Singleton Pattern”. Check it out on 1 or Wikipedia