Copy your snippet from Install the snippet, then:
Create a Custom HTML tag
In your GTM container, go to Tags, add a new tag, and choose Custom HTML.
Paste the snippet
Paste the full snippet into the HTML field.
Set the trigger to All Pages
Set the trigger to All Pages so it fires on every page view.
Submit and publish
Submit and publish the container version, then verify.
GTM loads tags after the page, and some consent or performance plugins delay or block Custom HTML tags. If verification does not pass, install the snippet directly in your site’s <head> instead.