First decide: prevention or an active squirrel entry?
The hardware is simple. The timing is not.
Do not treat every loose vent cover as a quick repair. A squirrel may have used the opening only once, may still be using it every day, or may have a nest inside a soffit or attic void. A correct guard installed at the wrong time can leave an animal trapped behind the repair and turn a small roofline problem into chewing, odor, or interior damage.
From the ground, watch the roofline during daylight for repeat traffic. Freshly torn screen, chewed plastic, nesting leaves at a vent, stains below an opening, or a squirrel disappearing under the eave all point to an active access route. In an attic, look for daylight, disturbed insulation, droppings, and a clear path from the opening. Do not go onto a steep, wet, icy, or unfamiliar roof to prove the point.
Repeated daytime activity often fits gray squirrels. A light, fast animal moving after dark can be flying squirrels or another attic species, which is one more reason not to close an opening based on one quick sighting.