Disable ScreenTime on Mac OS without knowing passcode set on another device
When I enabled ScreenTime on my MacOS after upgrading to Catalina, and checked "Share across devices" to combine ScreenTime statistics with those on my iPhone, it automatically started to use the ScreenTime passcode I use on my iPhone. The problem: a year ago I had intentionally set a random passcode on my iPhone and forgotten it, figuring that I could always use my laptop to respond to emergencies, and had carefully chosen which apps should always be available. (Furthermore, at some point I managed to disable ScreenTime without even knowing that passcode, so it was disabled when I enabled it on my Mac.)
My Mac was now protected by a passcode I didn't know, and the ScreenTime passcodes apparently act as root-level unbreakable passcodes that brick your computer if you forget them - there is no reset, no override, and no warning. I should note that my Mac never asked me to confirm I knew the passcode it was applying, which it got from my phone while ScreenTime was disabled there, and which I hadn't entered in a year.
The solution
My laptop used my phone's passcode because the ScreenTime passcode appears to be stored in iCloud. Any device that uses ScreenTime will automatically grab and use the ScreenTime passcode stored in iCloud if you enable "share across devices". This even overwrites any passcode set locally, if you later "share across devices."
The way that I recovered my bricked device was to log out of iCloud. This reset all settings connected to iCloud, including ScreenTime. I turned ScreenTime off, logged back into iCloud, and my ScreenTime did not have a passcode and the "Share across devices" box was unchecked. I am treating that box like the nuclear button it is.
If you find you have this problem on an iPhone running ios13 you can try a couple of things. The first suggestion might not work, or it might just have been a coincidence, for me. None of us remembered setting the passcode to the first 4 digits of our mobile number but that is what our code ended up being. Very weird so perhaps iCloud (Apple) sets it as a default.
Try testing the first 4 digits of your mobile phone number as the default passcode.
This will definitely work for you but you need access to an ios12 iPhone or iPad.
a) Access an ios12 device and sign in using the iCloud account that's causing the problems on your devices.
b) You will now hopefully see the Screen Time issue spread to this ios12 device too.
c) Now plug it in to a MacBook or iMac to take a backup. Catalina iOS backups are taken through the Finder screen. Follow this quick guide if you need to >>> https://youtu.be/JNSbVc11Yn4
d) You MUST backup using encryption. Write down the encryption password because you'll need this again later.
e) Once the backup is complete open the path to this location >>> ~/Library/Application Support/MobileSync/Backup
f) Now download Pinfinder. It's a free tool for extracting the Smart Time passcode that you've forgotten. Download here >>> https://pinfinder.net
g) Extract the Pinfinder tool and copy pinfinder executable script to the Backup folder you opened in step 'e' above.
h) Making sure to follow the instructions on the Pinfinder website from here on. You, like me, will see an output in a Terminal window. And in there you will see your lost 4 digit passcode.
I really hope this helps someone and many thanks to those who have contributed to the free extraction tools.