Did you follow the steps mentioned at the bottom of this related Apple page?
...
How to redeem your offer.
- Make sure your iPhone or iPad is running the latest version of iOS or iPadOS.
- Pair your eligible audio device to your iPhone or iPad.
- Open the Apple Music app on your iPhone or iPad and sign in with your Apple ID. If the offer doesn't appear immediately after launching the app, go to the Listen Now tab where it will appear.
- Tap Get 6 months free.
Get Started
...
copied from: Six Month Offer - Apple Music
Also check these requirements:
...
Which devices are eligible to receive 6 months of Apple Music for free?
Any AirPods Pro, AirPods (2nd generation and 3rd generation), AirPods Max, HomePod, HomePod mini, Beats Fit Pro, Beats Studio Buds, Powerbeats, Powerbeats Pro, or Beats Solo Pro is eligible. No purchase necessary for current owners of eligible devices. AirPods (1st generation), Beats Solo3 Wireless, Beats Studio3 Wireless, Beats EP, and Beats Flex are not eligible.
...
I have an Apple audio device that came with 6 months of Apple Music for free. How do I activate my subscription?
New Apple Music subscribers get six months free with an eligible audio device. Make sure your iPhone or iPad is running the latest iOS or iPadOS. Then, you can activate your Apple Music trial after you pair your audio device to your iPhone or iPad. Or visit support.apple.com for more information.
...
When does my offer expire?
You have 90 days after first pairing your device to take advantage of your six free months of Apple Music. For current owners of eligible devices, you have 90 days after upgrading to the latest iOS or iPadOS to redeem your six months free.
...
copied from: Six Month Offer - Apple Music