In Summary:
- Restart
- Go to System Setting/General/Software Update
- Follow the prompts
I had the same problem and there was a lot of discussion in April 2022 about problems with Studio Display updates. It seems to be teething problems with the firmware updates rather than a bad lemon (or apple).
I had the firmware downloaded but it just wouldn't load. There was mention of a restart required so I tried that. The fail to update message was gone BUT I still had the same firmware: Version 16.4 (Build 20E246). Then when I checked for updates the Studio firmware was there and I clicked install now - a dialogue box came up with a countdown to restart or "Restart Now". Being impatient I restarted and got the usual "do not turn off" messages as the rest of the screen went blank and fairly promptly up came my login screen and I now have:
Display Firmware Version: Version 17.0 (Build 21A329).
I'm surprised it's that simple - I hope it is for you.
[Mac Studio M1, Studio Display, macOS 14.0]