You will have to restore the phone to factory, and you will have to set it up as new. You cannot use a backup since it contains the passcode. See this support document, Use parental controls on your child's iPhone, iPad, and iPod touch - Apple Support
2 replies
You will need to reset your your phone to clear the screentime passcode: If you forgot the passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support and set up the phone as New, because the passcode is saved in the backup.
Now that I've told you the official answer, a web search may turn up a less drastic way that I shouldn't post here.
l forgot the screen time passcode of my iphone 5s?