If you connected your Magic Trackpad or Magic Keyboard with one Mac and want to use it with a different Mac, you have to reset each one of the input devices.
First, confirm that Bluetooth is activated on the Mac. Go to System Preferences => Bluetooth. Check "On
Turn off the Trackpad. Hold down the Power Button on the trackpad or keyboard. A green light will go on, and then will go off as you hold down the button.
From the Bluetooth menu in the menu bar, click Set Up Bluetooth Device... or Open Bluetooth Preferences...
A panel will open with a list of nearby discoverable Bluetooth devices. A Pair Button might appear at the right of each listing.
Next turn on the trackpad or keyboard ...
Hold the Power Button on the Magic Trackpad down for five seconds until the green light starts flashing.
As soon as the trackpad or keyboard appears, click on the Pair button for the appropriate listing. You might not see a user-friendly name listed. Instead, you might see an address number for the trackpad or keyboard appear on the list. Your clue is the icon on the left, which will show a trackpad or keyboard.
Sometimes timing the green light flashes with the clicking of the Pair button are a little tricky. You might get a message that reports the trackpad or keyboard failed to connect.
If the input device (trackpad or keyboard) fails to connect with the computer, power it down by holding the power button for about 5 seconds. The green light will activate and then turn off.
Next power on again by pressing the power button for 5 seconds, and be ready to click the Pair button for the respective device while the green light flashes. The trackpad or keyboard should connect by the second or third attempt.
When the keyboard connects, the user is prompted to enter a series of characters (letters and numbers) to further confirm the connection or pairing between the computer and the keyboard.
On newer versions of MacOS, battery power is indicated for each device. Battery life for the Apple products is not the greatest. Rechargeable batteries are recommended. Changing the batteries does not require a repeat pair process.