Patone, M., Mei, X. W., Handunnetthi, L., Dixon, S., Zaccardi, F., Shankar-Hari, M., Watkinson, P., Khunti, K., Harnden, A., Coupland, C. A. C., Channon, K. M., Mills, N. L., Sheikh, A., & Hippisley-Cox, J. (2021). Risks of myocarditis, pericarditis, and cardiac arrhythmias associated with COVID-19 vaccination or SARS-CoV-2 infection. Nature Medicine. https://doi.org/10.1038/s41591-021-01630-0
Specifically follow this figure: https://www.nature.com/articles/s41591-021-01630-0/figures/1
Basically the risk is higher for people under 40.
In that cohort, risk is highest with the Moderna vaccine within 1-7 days following first and second dose. The risk is higher with the 2nd Moderna dose as compare to Pfizer one. I suspect it may be due to dosing.
Risk is also present with the Pfizer does but more so with the 2nd dose.
Covid-19 itself can also cause Myocarditis.
"The risks are more evenly balanced in younger persons aged up to 40 years, where we estimated the excess in myocarditis events following SARS-CoV-2 infection to be 10 per million with the excess following a second dose of mRNA-1273 vaccine being 15 per million."
Overall, the risk is non-zero but very low compare to actual background rate of myocarditis.
"The incidence of myocarditis is approximately 1.5 million cases worldwide per year. Incidence is usually estimated between 10 to 20 cases per 100,000 persons." Quoted from Kang, M., & An, J. (2021). Viral Myocarditis. In StatPearls. StatPearls Publishing. http://www.ncbi.nlm.nih.gov/books/NBK459259/
So we have 1.5 cases per 100,000 (Moderna vaccine) vs 10-20 per 100,000 (Background).
For children it's close. In any case, the order of magnitude is 1 to 10,000 (for children)
Total risk from Covid (all other risks) is higher than risk of myocarditis.