Depending on the exact nature of your overheating issue, that may not be that uncommon. Truth be told: on hot summer days, every iPhone I’ve ever owned had problems with the heat, eventually reporting that it can’t function until it cools down.Pixel 7 Pro. Camera is gorgeous but it overheats and battery life is abysmal.
... Except for the 14PM that I bought just recently. Gotta say, that particular improvement was a very pleasant surprise. (I imagine the 15 will likewise be better about heat management.)