When resetting the iPhone, was it restored from a backup? If so, then the passcode was restored as well. You should not need to create a new iCloud account and would first try resetting the phone again and enter your current Apple ID without restoring from a backup. Here is the Support Article to reset your iPhone to Factory Settings. It also says that you will not be able to restore from a backup if you cannot reset the Screen Time Passcode.
- If you forget your Screen Time passcode, you can reset it. Restoring your device using a backup won't remove the Screen Time passcode.
How to factory reset your iPhone, iPad, or iPod touch - Apple Support
The reset option will not be available if you did not use your Apple ID as a backup in case you forget the passcode. When you set the Passcode, you are given an option to use your Apple ID in case you forget it. If you cancel this message, then you are given a warning that you will not be able to reset the Passcode without entering your Apple ID. Skipping this last warning, will not give you the option to reset it as described.