The T-Molding slot cutter is selected according to the width of the part of the t-molding that goes into the slot.
T-molding.com, and I am sure other sites, show a drawing and tells what width the slot cutter needs to be for the t-molding you are using.
I always cut the slot with the router first, then stick cardboard (thickness of cardboard close to the width of the slot, but a little less, so it doesnt fit tight), in the slot before painting.
Before the paint dries, I slide the cardboard back and forth then remove it.
Cardboard keeps paint out of the slots.
Getting paint in the slots is a big PITA later when you insert the t-molding, and should be avoided at all costs.
Of course if you are using laminate and not paint, you would apply the laminate first, then cut the slot.