I do not have Airpods Max but I want to stress out that ANC does better with low frequency noises (airplanes, subway, machines) than high pitched voices (baby crying).
I expect Airpods Max to perform better than Airpods Pro because they offer additional noise isolation (due to being overhead). That being said it still depends on the distance between you and the crying baby. If it is in close proximity to you, you will have to max out the volume and you still might be unable to block it 100 %. If we are talking about blocking neighbors' crying baby then they would help.
This is my experience with Sony XM3 but Airpods Max are not that different when it comes to ANC compared to the Sony.