New to Xcode, how can I make a program that modify's my mac's display settings when run?

Or is it not possible? My idea is a program that can disable low power mode, change my display type to apple XDR, and set my refresh rate to ProMotion (120)

New to Xcode, how can I make a program that modify's my mac's display settings when run?
 
 
Q