Try a soft reboot by turning the phone Off and On.
You could try going into Settings_Apps_Camers and choose Reset Settings.
And there is a Hardware test:
go over to your dial pad and type in *#0*#, this will bring up a number of tests.
Personally as the phone is so new I would also consider going back to source and asking for it to be swapped out @Chlo2
Daily Driver > Samsung Galaxy s²³ Ultra 512Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "