I start by getting up there with a flashlight and checking what you've already got, because foam sprayed over soaked insulation or a mess of droppings just seals the problem in. Anything wet or dirty comes out first, and then our crew closes off the soffit, gable and ridge vents, since a sealed attic doesn't breathe through them anymore. We spray the open-cell on the underside of the roof deck, the boards under your roofing, and on the gable end walls, and we check the edges down at the eaves as carefully as the middle, because that's where coverage usually runs thin. Open-cell works well in a sealed attic where it won't get wet, and if a spot is likely to see water, I'll tell you when closed-cell foam, the denser kind that blocks moisture, suits it better. Before anything gets sprayed, I'll also bring up having your heating and cooling looked at and any gas equipment up there, because sealing the attic changes how they run.
The same foam goes on the walls and roof decks of shops and metal buildings, and our commercial insulation work covers those. The attic is only the top of the house, so if your floors run cold or the space underneath smells damp, a crawl space vapor barrier keeps ground moisture from working up into it.
Open-cell foam at the roofline
This suits a house with ductwork or the air handler up in the attic, because sealing the roofline pulls all of that inside the part of the house you're cooling. Foam costs more than loose fill, but it seals the air and insulates in one pass.
Air sealing and a blown-in top-up
If nothing but Christmas decorations lives up there, air sealing, which closes the gaps around can lights, pipes and the hatch, plus a top-up of loose fill blown through a hose usually gets you more for the money. I'll tell you straight if that's your house.