Spatial audio iOS compatible le with AirPods Pro (1st or 2nd generation), AirPods Max, AirPods (3rd generation), or Beats Fit Pro. For more info, see the 'Turn on spatial audio' section in:
Listen with spatial audio for AirPods and Beats - Apple Support
Also see the 'If you choose Automatic, here’s what you need' section in:
About Spatial Audio with Dolby Atmos in Apple Music - Apple Support
which says:
Supported songs automatically play in Dolby Atmos when you're listening with:
- AirPods Pro, AirPods Max, AirPods (3rd generation), or Beats Fit Pro with Spatial Audio turned on
- AirPods (1st or 2nd generation)
- BeatsX, Beats Solo3 Wireless, Beats Studio3, Powerbeats3 Wireless, Beats Flex, Powerbeats Pro, Beats Solo Pro, or Beats Studio Buds
- Any Bluetooth headphones that you categorize as headphones on your iPhone or iPad
- The built-in speakers on an iPhone XS or later (except iPhone SE), iPad Pro 12.9-inch (3rd generation or later), iPad Pro 11-inch, or iPad Air (4th generation or later)