Use Google Tag Manager if you need:
The ability to deploy and modify both Google and 3rd party tags
The ability to deploy and modify tags for both web and mobile apps
The ability to deploy and modify tags on the fly from a web interface
Collaboration and versioning capabilities.
Use gtag.js if you can't use Tag Manager, or if the following capabilities are important to you:
The ability to install tags directly on your site, without the ramp-up time of setting up a tag management system;
The ability to work with your tags directly in JavaScript without being required to work with a separate interface.