There are so many ways to go about this, that it really depends on you, your tooling, and level of comfort with it.
There are literally matched sets, designed specifically for doing exactly that, with your parts lying flat on a router table.
It can also be done with a more common straight bit, with the parts standing on edge, upside-down on a router table.....or right side up with the routing aid (or similar)
It can also be done with a 3-wing slot cutting router bit too, and of course, the table saw method.
I'm equipped to do any of these methods, though generally preferring the bit set.
If you are completely stuck with having a stopped groove, either of the vertical orientations, so the router can stop them.
Sometimes on bigger doors, I add Dominos to reinforce the stub tenons. (If the door needs 3 hinges, I do the Dominos too)