How to capture the Tarrasque for transportation and later use
Firstly, some base constraints. The Tarrasque (henceforth referred to as "Big T") can't be affected by any spell that requires a ranged attack roll or has a line area of effect. Also, I'm assuming that a giant Tarrasque statue isn't portable enough for your purposes. Finally, anything that involves a saving throw will have to be usable at least 4 times, since Big T can choose to succeed the first 3 saving throws with Legendary Resistance.
So, in order from simplest to most complicated:
- The Imprisonment spell. The Minimus Containment option will do nicely for your purposes. The only downside is that it's a 9th-level spell which takes a minute to cast, and, as mentioned, you'll have to hit Big T with it at least 4 times. Even then, it's really good at making saving throws.
- The True Polymorph spell. Pretty much the same as Imprisonment, you turn Big T into a portable object or a small creature that you can carry around. If you want to unleash it more than an hour after capture, you'll need to use Dispel Magic.
- The Polymorph spell. This one only works for up to an hour, but as a 4th-level spell it's a lot easier to keep using it until Big T fails a saving throw. Plus if your DM is nice, you can use Conjure Woodland Beings to get 8 pixies, then have them cast Polymorph for you - 8 spells for the price of one!
- A Mirror of Life Trapping. You need to have one, and you need to trick Big T into looking at it, and Big T needs to fail his saving throw. But other than that, it works perfectly for you.
- An Iron Flask. This one only works if Big T is on a plane that isn't the Material Plane, and he still needs to fail a saving throw. And, you need to have one. But other than that, it works really well - it even forces him to obey your commands when you unleash him! If this is enough of a draw for you, consider using Plane Shift to get Big T off the Material Plane. It's better than it sounds, because he'll probably use up all his Legendary Resistances foiling your Plane Shift, so he'll be relatively vulnerable for the Iron Flask.
- The Wish spell. Wish can, theoretically, do anything. It all depends on how good you are at wording the wish and how generous (or not) your DM is at interpreting it. I put this one last because it's by far the most risky - being killed by Big T could be the least of your worries compared to a wish that goes horribly wrong.