In Drupal 8/9 you create a MYTHEME.info.yml file to specify the theme name, and base themes (if this is a child theme), regions, etc. One of the items is a reference to your 'libraries'.
name: MYTHEME type: theme description: Custom Drupal 9 theme base theme: stable core_version_requirement: ^8 || ^9 libraries: - mytheme/global-styling
Then you have a MYTHEME.libraries.yml file that looks something like this:
global-styling: version: 1.x css: base: css/basestyles.css: {} '//fonts.googleapis.com/css?family=Roboto:400,700,500|Open+Sans:300': { external: true } css/themestyles.css: {} js: js/slick.js: {} js/basescripts.js: { scope: footer } '//maps.google.com/maps/api/js': { external: true, scope: footer } js/themescripts.js: { scope: footer } dependencies: - core/jquery - core/drupal.ajax - core/drupal - core/drupalSettings - core/jquery.once
You'll notice above we have examples of adding CSS both locally and an external file for a Google font.
The JavaScript examples show local and external files, but also the ability to specify if they should appear in the header (default) or the footer. This is really handy especially if you are 'Drupalising a flat theme' and certain JS files need to be at the bottom of the page.
Also, when I first started building in D8/9 I noticed jQuery didn't load when I viewed the page logged out. That's because you need to specify the dependencies... which is a little odd, but copy/paste the last 6 lines (above) into each theme you do and it'll become a distant memory.