I answered this when you asked in the photo thread. It's just the nature of that beast with wide angle shots on any camera. There's nothing you can do about it in the native camera app, and I'm not aware of any third party camera apps that can edit it on the fly. You'll have to find a photo editor to correct it. This article has a decent write up on what's going on.
https://photographylife.com/what-is-distortion/
Note that this even makes references to DSLR lenses and how they have additional lens elements built in to help compensate this barrel distortion. There simply isn't enough room in the phone to do the same.