Big Sur bluetooth keyboard not found after changing batteries. Mac mini

If your Bluetooth keyboard has a charging cable (Magic Keyboard 2), connect that between your Mac and the keyboard to pair them.

If not, turn off the keyboard holding the power button, then turn it back on and continue holding the power button after it turns on, until the green LED is flashing. This puts the keyboard into pairing mode and makes it discoverable for your Mac mini's Bluetooth setup assistant.