As per the article Set up Screen Time for a family member on iPhone - Apple Support
Important: If you set up Screen Time for a family member on their device (not through Family Sharing), and you forget the Screen Time passcode, you can use your Apple ID to reset it. However, if you set up Screen Time for a family member on your device through Family Sharing and you forget your Screen Time passcode, you can reset it on your device using your device passcode, Touch ID, or Face ID.
See the article If you forgot your Apple ID password - Apple Support
Read the section - Use someone else's device to reset your password.
When family sharing is set up reset passcode see the article If you forgot your Screen Time passcode - Apple Support