Bluetooth doesn't work on new phone but on old one it works

Dear @Fabi0011 welcome to the Community,
problems related to the BT comm's with the newest Android versions are treated almost every day on the forum.
Probably you can find a solution in one of those posts. For example this:

Though from your blocks it seems that you aren't using a BLE, but a classic BT, please be aware that for new Android versions it is mandatory to enable the (fine) location on your phone.