On my phone (Galaxy S23) searching for "codec" in settings and clicking on search result ”BT Codec” opens at the Bluetooth Codec settings.
This may only work on certain phones, but is worth trying.
On my S23 I can't change from the default SBC when no BT earphones are connected.
When I connect my BT earphones (I use Sony) it automatically selects LDAC. The best codec for Sony.
So I don't need to manually change the codec.