That worked! Thanks!
Can you check this: Set Default Microphone Input When Connected to Bluetooth Earphones
The problem is I have to switch to earphones mic to HSP profile as the Bluetooth earhone mic doesn't work with A2DP. I want this to autoswitch when I'm in Zoom call, for example.