I know we can press Ctrl + F2 to detach the debugger but is there a shortcut to attach debugger in android studio?
You can add a mapping for it in Android Studio:
Preferences > Keymap > Search for 'Attach debugger' or navigate the tree to: Main menu > Run > Attach debugger to Android process.
Then just add your preferred mapping. I think it's none on a fresh install of studio. Good luck!