A corner that will not close may start with the cut itself. Test a used mitre box with a scrap of the kind of trim you actually plan to fit.
Check the fit, saw and clamps
Make sure the trim fits flat or on edge, as the job requires, and the blade travels through the guides without obvious sideways play. If the model uses cam pins, check that they are present and hold the workpiece. The STANLEY 1-20-112 is one example of this design.
Cut two scraps and bring them together
Secure the box and the workpiece on a stable bench. Check a square crosscut first, then make two mirrored 45° cuts. Bring the offcuts together against the square. If the joint has a wedge-shaped gap, check blade play and how firmly the trim sits before you buy.