Exlude traffic from a subdomain

Hi
New to Matomo. I can see that Matomo pics up double as much traffic/page views as my GA4 account, but I think it is because it takes a subdomain into account. I want to exclude traffic from my subdomain which has a URL structure like this: subdomainname.maindomainname.com and thereby only take my data that derives from maindomainname.com. I set it up using Google tag manager. How do I exclude this from the data in Matomo?
Thanks!
Br
Morten