The vaccines have been studied and are safe and effective. The known risks of COVID-19 illness and its related, possibly severe complications, such as long-term health problems, hospitalization, and even death, far outweigh the potential risks of having a rare adverse reaction to vaccination, including the possible risk of myocarditis or pericarditis. The risk of myocarditis, an inflammation of the heart muscle, and pericarditis, an inflammation of the outer lining of the heart, after vaccination may be further reduced with a longer time between the first and second dose for males age 12 to 39.
In a study of five million Pfizer vaccine recipients, only one in 50,000 people experience inflammation of the heart after vaccination. Also, most patients with myocarditis and pericarditis who received care responded well to treatment and rest and quickly felt better. The risk of developing myocarditis or pericarditis is much greater after a COVID-19 infection than after vaccination. More info about risks and benefits here.