Latest 4.5beta Sonic Pi on newly released RaspberryPi OS bookworm

4.5 is designed to use pipewire for audio. Do you have that installed? I think the flat pak should install it. Also if you do, you can install qpwgraph to graphically check and make sound connections. By default SP should try to connect to your hdmi monitor speakers. If you use usb or audio jack on a pi3b+ you need to alter this. see a picture of the app here How to get inputs for sound_in? sound_devices mixer_info
You can use the pw-link command also from the command line. Try pw-link --help

My youtube video covers some of this form about 6:57 mins onwards.