Changing the shutter speed when taking a picture is not possible with the default camera application on a Google Pixel 6 with Android 12. However, one can use this mod: https://www.celsoazevedo.com/files/android/google-camera/dev-MWP/ (root not needed).
On the left side, bottom part, there's an option to change the exposure time.
There's a native long exposure mode: