I second this, but might suggest the XM4's instead. I upgraded from a pair of Sony WH-1000XM2's to the AirPods Max. Comparing the two, the XM2's folded really nicely, had a great case, and came with a 3.5mm jack adapter (among other adapters). The AirPods Max have some superiority in terms of comfort, overall build quality, seamless operation with Apple devices, and noise cancelation (as you'd expect, comparing a modern device with something that came out about five years ago).
However, the differences aren't huge between the Max and the WH-1000XM2. The WH-1000XM5 is the latest iteration, and when I checked reviews it seemed quite mixed as to which one was regarded as being superior. Sony unfortunately changed the design with the XM5 so that it no longer folds to be quite as compact, which is why I recommend the previous iteration (XM4) instead, as it seems to still have the folding design. Sound-wise, and considering noise cancelation, the latest will always be the best... but if the XM2's were fantastic, I have no doubt that the XM4's are probably strong performers as well.
I don't regret the AirPods Max purchase, but I do recognize that it was the less practical one. I'm enjoying them, but unless Apple makes some changes to their portability and standby modes, when they die I'll probably return to what ever XM-number Sony is on.