I think it depends a bit on what sort of files you want to access.
If its images and other media, you are best to
upload them into each area, or at least use the repository system to choose the already uploaded file. That is because Moodle does complex things with URLs. ie it uses temporary draft URLs when editing html and other ones when displaying. And it secures URLs so that the URL from one course / activity, might not be available to a different user or might get removed or changed. Basically you should leave it up to Moodle to serve the URL for media files to the user. So add them uniquely in each location.
For
javascript, you might find things get complicated. If its a library you could load it from a CDN. Or you could just upload it into a dir in the Moodle site using
FTP. But other people use the Generico filter (my plugin) to get javascript working in a semi-elegant way. Or you might check out Dominique Bauers
https://moodleformulas.org site to see how he suggests getting JS and
CSS into various place in Moodle