Hello Chanvuth,
Welcome to Apple Support Communities!
We understand that spatial audio is not working as expected with your iPhone XS Max and AirPods Pro but it working as expected with your other Apple device. We’d like to help.
Here’s some information about how to Listen with spatial audio for AirPods Pro and AirPods Max. Per the section “What you need”, you’d need an “iPhone 7 or later…” so your iPhone would be expected to support spatial audio with AirPods Pro.
When testing spatial audio on your iPhone, are you playing “Audiovisual content from a supported app”?
Try to listen to the spatial audio demonstration on your iPhone. To learn how to play the demonstration, take a look at the section titled “Turn on spatial audio” in the resource linked above. Is spatial audio working when testing it?
Keep us posted on the results.