Chosen Solution

My iPhone’s compass and level doesn’t work not only that but the auto-rotate function doesn’t work and on top of all of that my phone doesn’t ring despite the phone isn’t on mute, it can only vibrate to notify me that I am receiving a call. What can I do to fix this?

If you have already tried a restore then it’s a hardware issue. It’s most likely damaged compass IC which only someone that does microsoldering will be able to fix as it would need to be replaced. Usually these go bad from phone being dropped, physically damaged when doing a screen replacement or liquid damage. Also the top right screw for the metal plate that goes over the screen connectors is demagnetizied as that is near the compass IC area to avoid interference. If another screw was out there instead it may interfere with the compass IC.