Its because of the screen time restrictions you have set up on your iphone - It seems it copies them over to the Mac settings now. so on your iPhone go under Settings Screen Time Content & Privacy Restrictions then down to Passcode Changes and Account Changes under ALLOW Changes. I have mine set to Don't Allow.
It seems those got carried over to Sonoma so on your Mac if you go under Settings Screen Time Content & Privacy then under Preference Restrictions and see Allow Passcode Changes and Allow Account Changes. Mine show they are switched off just like on my iPhone. you can turn them back on using the same screen time passcode you use on your iPhone.