how to paint moldings

A gap between wall and molding that I’ll fill with spackling instead of caulk.