If your Screen Time won't turn off on your iPhone, it may be due to restrictions that are enabled. To disable the restrictions and allow for signing out of your Apple ID, follow these steps:
1. Go to Settings.
2. Tap on Screen Time.
3. Select Content & Privacy Restrictions.
4. Enter your Screen Time passcode.
5. Disable the Content & Privacy Restrictions.
By turning off the restrictions, you should now be able to sign out of your Apple ID. It's important to note that you need to know your Screen Time passcode in order to disable the restrictions. Once the restrictions are disabled, you can easily turn off Screen Time and sign out of your Apple ID.