This is actually correct for the lenses the iPhone 14 Pro has (I have the same phone). The main lens is 24mm. The ultra wide lens is worse at 13mm. The problem, so to speak, is even the "normal" 24mm main is a fairly distorted wide angle lens.
The closer your subject is - in particular - to the edges and corners, the more distorted they get. This is particularly evident with the people at the far left and right of the second example. You know they were standing straight, but in shot, they look like they're not only leaning towards the edges, but they're also being stretched. This is the same issue for the person circled in the middle. He's kind of close to the top of the frame, so the 24mm bend is stretching his head towards the top.
The baby's head in your original example is a victim of the same distortion. While the baby is more towards the center of the shot, it's still being bent by the wide angle 24mm lens as it's close enough to the left side for the lens distortion to be visible.
After a fair amount of practice, I've learned how to reduce this issue. It also helps that I used high end film and digital cameras with various lenses for decades. So I was already familiar with this type of distortion.
Here's a quick test you can do to see how a 24mm lens distorts. Stand about 50 feet from a home and point the phone's camera at it. When you hold the phone as level/square to the home as you can, the image looks basically normal. All except for the unavoidable distortion along the sides. Particularly the corners. Now tilt the camera up. Notice how the bottom of the frame spreads out in an obvious trapezoid shape. As if the someone grabbed the bottom corners and stretch them out to the left and right like taffy. Then tilt the camera down from level. Now the top will be very visibly distorted as a trapezoid.
So, how to cancel that wide angle distortion out. At least, as much as you can.
- Hold the camera as level to the subject as you can. Per your second image, you were likely standing straight, which meant you had to tilt the camera down some to frame the image the way you wanted. That caused the trapezoid effect to be more pronounced across the top of the frame. Instead, crouch a bit so the camera is being held level across the vertical plane. Any tilt makes the distortion more visible.
- Back away from the main subject. Yes, you hate to waste about a quarter of the image (all around the outside edge) with what's nothing but background, but your objective is the keep what you really want a shot of more towards the center of the frame, further away from the distorted edges and corners. If you're shooting at 1x (which I always do if I can help it, and without a flash so I always get a 48 MP image), then you have enough image data to crop away the dead area around the outside without clipping into the main subject.
And, if you can, use software that has a lens correction option. In Photoshop, Adobe has a preset for correcting the lens distortion of virtually any cell phone you can buy. I also shoot everything as RAW so I have full editing control of my shots. In the Camera RAW settings, Photoshop automatically sets the correction for an iPhone 14 Pro's 24mm lens. You just have to turn it on with the check box.

Example, uncorrected image on the left, and with lens correction applied on the right. It's kind of hard to see here, but the left image has a pincushion distortion which gets more pronounced as you move away center. Everything is bowed horizontally and vertically. All of the lines on the right are straight.

Easier to visualize when laid over one another. With the center points lined up, I changed what's black on the uncorrected image to red. You can see how it distorts more and more away from square the further you get away from center.

Anyway, that's what you're fighting. The bane of any wide angle lens.