I have the same problem as well. Got my iPhone 12 Pro Max in Dec 2020 and having been facing this internet connectivity issue ever since. Both on WiFi and cellular data. At first I thought it was T-Mobile and thought of switching carriers but my wife and son’s phone (Galaxy 10+ and iPhone SE) are fine.
Tried everything and pretty sure this is the iPhone 12 Pro Max issue and not the WiFi or the cellular networks. Been observing and evaluating this since December 2020.
@apple - please fix this. This is disappointing after spending more than a $1000++ for a top of the line flagship phone. And oh btw, another tidbit. When I ordered mine from the Apple website it shipped directly from China and not the US. Faulty batch @apple??