There is a video about it from WWDC 2021 called Meet the Screen Time API: https://developer.apple.com/videos/play/wwdc2021/10123/
There are actually 3 APIs (none of them have Screen Time in the name)
Managed Settings (https://developer.apple.com/documentation/ManagedSettings)
Family Controls (https://developer.apple.com/documentation/familycontrols/)
Device Activity (https://developer.apple.com/documentation/deviceactivity/)
Post
Replies
Boosts
Views
Activity
Actually it works for me on iOS 15.0 beta 8 and Xcode beta 13.0 beta 5.
I get the same error.