I start by going up and looking hard at the attic before I write anything, checking the wiring, the old insulation, the roof deck for stains and any furnace or water heater that vents up through there, because sealing over a problem only hides it. Our installers go after the big openings first, at the tops of walls, over dropped ceilings and behind kneewalls, since that's where most of the air moves. Smaller gaps around pipes, wires and can lights get caulk or foam, and wider openings get rigid blocking sealed in place, because loose insulation slows heat but doesn't stop air. Around flues and chimneys we use materials made to take the heat. We keep the eave and roof vents open so the attic can still breathe, and the hatch gets foam board and weatherstripping so it seals each time you close it. When we're done, I walk through it with you and show you what we sealed.
Sealing is usually the step right before insulation goes in, so a lot of our jobs carry on into retrofit insulation, adding to what an older house already has once the leaks are closed. Where ducts run through the attic, spray foam insulation can be the better call, and I'll tell you which way I'd go and why.
Seal the gaps, then top up loose fill
This suits most attics, where the ducts are down in the house and there's already some insulation up there. Sealing first and then topping up with blown-in insulation, loose fill blown through a hose, usually gets you the most for the money, so it's where I'd start.
Spray foam when the ducts live in the attic
Foam costs more, but it seals air and insulates in the same pass, which matters when your heating ducts run through the attic and need to sit inside the sealed space. If that's your house, I'll lay out both ways side by side so you can choose.