Since the M240 was working normally and macOS 27 still cannot see it under “New Devices,” I would focus first on whether the mouse is actually entering Bluetooth pairing mode. Replacing the battery and updating macOS would not necessarily address that.
Logitech specifically says the M240 must be put into pairing mode by holding its pairing button for three seconds until the LED starts blinking. (Logitech Support)
Try this exact sequence:
- Turn the M240 off using the switch on its underside.
- Wait about 10 seconds.
- Turn it on.
- On the underside, find the pairing button. Press and hold it for about 3 seconds. Don't just press it briefly.
- Watch the LED. It should begin blinking, indicating that the M240 is discoverable.
Immediately open System Settings >> Bluetooth on the MacBook Air and look under Nearby Devices/New Devices for LOGI M240 B. Logitech's documentation identifies that as the Bluetooth device name. (Logitech)
Select it and click Connect.
The important diagnostic point is this: if the LED does not start blinking after the 3-second press, the problem is probably on the mouse side rather than macOS's Bluetooth discovery. Logitech says that rapid blinking indicates that its Bluetooth device is ready for pairing. (Logitech Support)
If the LED does blink, but the Mac still never displays LOGI M240 B, I would next try a simple isolation test: turn Bluetooth off and back on in System Settings, restart the Mac, and then put the M240 into pairing mode again.
Apple also recommends restarting the Mac if Bluetooth isn't behaving normally and notes that Bluetooth accessories need to be in pairing mode and close to the Mac when connecting. (Apple Support)
One other useful test: try pairing the M240 with another Bluetooth device, such as an iPhone or another Mac, without changing anything else.
If that device also cannot see the mouse while the M240's LED is blinking, that would strongly point toward the mouse itself rather than your MacBook Air.
I would not start deleting Bluetooth system files, resetting Bluetooth databases, or using Terminal commands yet. Those are more invasive than necessary at this point.
Logitech's M240 pairing instructions
Apple's current Mac Bluetooth instructions
If you tell us what the M240's LED does when you hold the pairing button for 3 seconds (no light, steady light, slow blinking, or rapid blinking), we can narrow this down considerably.