You can easily connect your headphones to a Mac from System Preferences, Control Center, or the Menu Bar.
You can connect a wireless keyboard to a Mac or PC using Bluetooth, as long as the keyboard is charged and in pairing mode.