After I had read the Monster Manual's Tarrasque entry, I began thinking of ways to kill it. The first thing that came to mind is for 1 party member to become a creature that is Huge in size, then grapple the Tarrasque while other members of the party attacked it.
My idea is to have a Level 20 Variant Human with at least 13 STR and 20 INT with the War Caster and Grappler feats. Before the battle, they would use the 9th level spell Shapechange to turn into a Storm Giant. As the battle begins, he would attempt to grapple the Tarrasque. It wouldn't be guaranteed, but it would still be possible because the storm giant overall has a +4 over the Tarrasque's Athletics, and has advantage. This makes the probability of the character winning to (check my math) around 80%.
Once the Tarrasque is grappled, the Storm Giant would use subsequent turns to re-grapple if it escapes, or to use their action to make it restrained. While this is happening, other party members would be supporting the giant or nuking the Tarrasque with magical bows. And every time the giant was hit, he would get advantage and +10 to the concentration saving throw.
My optimal party composition would be 1 or 2 Life Clerics or similar healers who are constantly healing the Storm Giant, 3 fighters with magical bows, and 1 Wizard or Sorcerer who are buffing the Storm Giant and the rest of the fighting force.
When you use the Shapechange spell, do you keep all of the character's feats? And is the Tarrasque being grappled affected by his Legendary Resistance?