How Do I Add My JS Code Inside <Head> or Before </Body> to a Page?

You can add JS code for the whole site in your project settings. To do this, click on the "Arrow" icon next to your project name and select Settings. Then go to the "Custom Code" tab, click on the "+" icon, and select script. Screenshot:

After that you will need to give a name to your JS code and fill in the required fields. The code itself is placed without "script" tags.