You can unlock the device using your Screen Time password. You will have been sent an email to tell you that the device was locked, along with a password reminder. To uninstall Screen Time , use the Uninstall option in the menu of Screen Time.
You may also want to change the screen lock back to what it was before instead of having to enter your Screen Time password to unlock the device. You can change this in Android Settings >> Security >> Screen Lock.