Remove the cabinet doors with your screwdriver. Take off the hinges and any other hardware. Lay out the cabinet door on a workbench.
Measure the height and width of the door. Mark out the measurement on a piece of trim with a pencil, putting two marks along the top edge and the measured span between them.
Set the trim on your miter saw, so the front side faces up, with the marked edge toward the blade. Move the piece so one of the marks is under the blade. Turn the blade 45 degrees toward the center of the piece. Make the cut.
Move the trim to put the second mark under the blade. Swivel the blade 45 degrees in the other direction, so it's pointing inward again. Cut the trim.
Coat the back of the piece of trim with carpenter's glue, putting it on in a thin coat over the whole surface.
Set the trim onto the cabinet door, lining it up along the top edge, with the two angled cuts touching the two upper corners. Both cuts both should angle down and inward from there.
Repeat the process to measure, cut and glue trim for the remaining three sides of the door. Butt the mitered ends tightly together at the corners.
Repeat for each door of the cabinet. Let the glue dry overnight.