How do I include JavaScript with assets (libraries.yml)? This is my mytheme.libraries.yml file:

global-styling:
  css:
    theme:
      css/style.css: {}

  js:
      js/effect.js: {}
    dependencies:
    - core/jquery


This is my js/effect.js file:

(function($) {
Drupal.behaviors.myBehavior = {
  attach: function (context, settings) {
      alert("Hello World");
  }
};
})(jQuery);


I created jquery.js in core folder of my site root.
Even if I remove the  dependency line from my libraries.yml and remove jquery syntax from my effect.js, I receive nothing on my site.
Most times it's about blanks. The yml files are very picky about this. Looks like your effects.js has 6 blanks instead of four.

And make sure, that you have your global-styling listed in the libraries section of your theme.info.yml.