Is your old trackpad a Magic Trackpad? If so, there are 3 generations of it. Th first generation uses replaceable AA batteries. The 2nd generation has rechargeable batteries and a Lightning connector for charging and for pairing. The 3rd generation has rechargeable batteries and a USB-C connector for charging and for pairing.
If yours is the 2nd generation and you still have the USB-C to Lightning cable (or any USB-C to Lightning cable) you can use that to pair it as described in the "Set up Magic Keyboard, Magic Mouse, or Magic Trackpad" section of Set up your Magic Keyboard, Magic Mouse, or Magic Trackpad with your Mac - Apple Support
If your is the 1st generation, see the "Set up earlier Apple wireless input devices" section of that same support article.