Do this steps:
- change screen time passcode
- turn off screen time passcode
- on the bottom on the screen on top of the keyboard, there is a Forgot Passcode button
- type your email
- Press OK
- Press Forgot ID or Password
- Then it ask your passcode BUT if you wait 5-10 seconds a popup ask for your iPhone passcode (not the screen time passcode)
- it ask the new iCloud password
Or even simpler, just go to Privacy & Security > Safety check and go through the procedure until you have the choice to change iCloud password.
Even with a time passcode set (and warning saying I could not do some actions because of the screen time passcode), I was able to disconnect all my devices and reset my iCloud password...