Heartworm prevention should typically begin when your pet is at least 8 weeks old. However, the exact timing may vary depending on your veterinarian's recommendations, the prevalence of heartworms in your area, and the specific preventive medication being used. It's important to consult with your veterinarian to determine the appropriate time to start preventive measures for your pet.