Sand the trim with a fine-grit sanding sponge. Sponges get into crevices where sandpaper can’t go and let you apply even pressure. Then apply the ﬁrst coat of paint, let it dry at least 24 hours, lightly sand it again for a completely smooth surface, and apply the second coat. After each sanding, vacuum the trim, then wipe it down with a tack cloth to remove the dust.
Small random-orbit or pad sanders make this job go faster. (Wallis first covers these boundaries with Synkoloid patching compound so no edge is visible after sanding.) As shown, you want to make sure that there is a feathered, smooth transition from exposed wood to old paint. For areas that might get close scrutiny, you can follow up with a 100- or 120-grit rubdown to erase any scratches.