This only happens when I flush and the leak is small.
There is a rubber gasket that goes between the tank and the bottom of the toilet. This is sold in a kit that also includes the bolts for the tank because these bolts are almost always completely rusted and can't be reused. Be ready to cut the bolts if the nuts will not come off and be careful not to crack or damage the toilet.
Since you are taking the toilet completely apart, it probably makes sense to also replace the fill valve and the flapper. These are also sold as a kit for around $20.