This annoyingly has been the case for the past three years; new major versions of macOS won't allow previous major versions of Xcode to launch.
But there's a workaround, you can either launch that Xcode from the command line:
❯ open /Applications/Xcode.15.4.0.15F31d.app/Contents/MacOS/Xcode
Or via the Finder by right clicking on the Xcode, selecting 'Show Package Contents' and opening the binary executable directly (at the same path as above).