First I check what's already up there, looking for thin spots out at the edges, where loose fill tends to run short, and for batts, the precut blanket pieces, that got squashed or pushed aside around wiring and recessed lights. Then we plan the new layer around what we find, deciding what stays, what has to come out, which gaps get sealed and how deep the new material goes. The sealing goes in before the insulation, because a fresh blanket laid over an open gap just sits there fighting a draft.
Spray foam costs more and seals air while it insulates, so it can be the right call when your ductwork runs through the attic. For most attics, though, sealing the gaps and topping up with blown-in insulation, which is loose fill blown through a hose, gets you there for less, and I'll tell you so even with foam in our name. If the drafts aren't just upstairs, our home insulation work looks at the walls, floors and crawl space along with the attic.