Google Tag Manager is used for website tracking and analytics. By creating a connection between your website and Google Tag Manager, marketers can create tracking tags for various purposes on your website without needing a web developer to install and update code.
Google Tag Manager can be added to your WordPress website a number of ways.
As a requirement is to add a piece of code after thetag, it depends on how your theme is set up on the best way to do this.
One option is to install a plugin from the WordPress plugin repository or contact your web developer who will install two small pieces of code on your website.