Yes. Transferring or restoring the phone with a backup will also pass on the Screen Time restrictions.
If you know the password of the the Apple ID used to setup the passcode, you can follow this instructions to reset it:
On an iPhone, iPad, or iPod touch
- Make sure that your device is updated to iOS 13.4 or iPadOS 13.4 or later.
- Go to Settings > Screen Time.
- Tap Change Screen Time Passcode, then tap Change Screen Time Passcode again.
- Tap Forgot Passcode?
- Enter the Apple ID and password* that you used to set up the Screen Time passcode.
- Enter a new Screen Time passcode, then enter it again to confirm.