Loading your own Javascript file:
Add a Javascript file in your folder structure
After the <body> tag containing the structure of your webpage, add a <script> tag referencing your Javascript file

If you want to use multiple Javascript files, simply add multiple <script> tags referencing each file. Note that order matters: files are loaded in sequential order. So if you are referencing one file within another, make sure to load the reference first.
Loading an external Javascript file:
Generally, external libraries are delivered in three ways.
I recommend options 1 or 2. Option 1 will have the best performance since it’s loaded locally. But Option 2 is more convenient if you want to quickly try out a library, and aren’t sure if you’ll commit to using it.
Here’s an example using Option 2: I copy-pasted the URL for the Draggable JS library from their website

Here’s a working sample project with a Javascript file properly linked:
template-web-project js linked.zip
The core elements of interactivity are: DOM selectors (document.querySelector..) and event listeners.