How do I transfer VS code to my Unity script?

I’m making a health script, I’ve got all the code written, but how do I transfer the code to my Unity script. I’m new so don’t use any fancy words. If I get this question answered, you may be able to play my fantasy survival game! It is called “Maestro Domador”. I will set it out for free on steam and Xbox. Thank you!

I would not recommend writing your code completely separate from your project. Look up a tutorial for linking VS Code to unity. Then, you can create scripts in unity and edit them in vs code. I also recommend this so you can use intellisense, which is o e of a developers best friends when writing code.

Right click in your project window >> create >> c# script
and then copy your code here … or re-type it.

I have found out how to edit a script! No need to explain anything.