Should modules be in source code management?
As Jaypan and leymannx say in the comments above, if you use Composer to manage dependencies, you can just include composer.json and composer.lock in your version control repository. Then you can use Composer to rebuild your project when you deploy. This has the advantage of keeping all third party code out of your repo.

https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies

The documentation linked above shows how to use Composer to install Drupal core, contrib modules, and even patches and libraries.

This approach is the emerging standard. But it has its pros and cons. Here are some Drupal and Composer "gotchas" to look out for:

https://www.jeffgeerling.com/blog/2017/composer-and-drupal-are-still-strange-bedfellows

If you don't use Composer, it's probably a good idea to keep core, contrib, patches and libraries in version control.