You appear to have the only iPhone out of over a billion that has ever been hacked. You should look for a more logical explanation for the symptoms you are seeing.
An iPhone can be managed by a business or school using a feature called MDM (Mobile Device Management), but that requires that the phone be physically set up by the IT administration team at a company or school; they must have physical possession of the iPhone to do this. Sometimes unscrupulous actors steal iPhones from a business and sell them to unsuspecting buyers. These phones can be restricted to certain apps and functions by the administrator, but the administrator cannot see what is on the phone or how it is used. The phone also cannot be erased and set up for someone else without the approval of the administrator. If you have such a stolen phone you are out of luck; you should return it to the business that actually owns it. their name will appear on the screen when you try to set up the phone.