How do I make sure I get a replacement toilet tank that fits the bowl?
I was about to upvote the answer of @GreyBeardedGeek , because in general trying to find a match will be impossible.  But then I read the word Toto.  Toto is a different case: they have a corporate sustainability principle.  The short answer is: call Toto at 1-888-295-8134.  As for gaskets: one should come with the replacement tank, else is easy to get at any hardware store.  Some PTFE plumbers tape is good also, if the supply line nut is metal.

And check the warranty also, it may apply depending on who you talk to at Toto:

TOTO warrants its residential faucets, bathroom accessories and cast iron tubs, excluding the acrylic side panel and accessories, (Product) to be free from defects in materials and workmanship during normal use when properly installed and serviced, for the lifetime of the Product from date of purchase.

The only real gotcha in this job is "don't drop anything".  The tanks are made of ceramic and crack easily (not to mention do a bang up job on toes).

The only real gotcha in the warranty is that it is nominally non-transferable.