Hook module placement
From Where to Put the Module Files:


  Manual import location
  
  If you import a module 'manually', you should place your module in that same default recommended location, HERE:
  
  [d8-root]/modules/HERE
  
  [Themes: [d8-root]/themes/HERE]


It's a good idea to keep custom and contrib modules separate, hence Drupal Project putting contributed modules into their own folder; following on from that, there's a pretty common convention to place custom modules under [d8-root]/modules/custom/. But you don't have to, you can use whatever hierarchy you like under /modules, Drupal will pick up anything it finds recursively.

After it's in place, don't forget to enable the module, or it won't do anything.