They never did clinical trials, these COVID vaccines are authorized only under emergency use.
The “trials” are going on now, more or less, in the general population.
They did do clinical trials. The first trials began March 16th, 2020. Phase 3 clinical trials began summer 2020 and results became available for Pfizer and Moderna in November 2020. So trials had been ongoing for 9 months when the EUA was issued.
Separate trials were performed for younger participants. The issue with myocarditis wasn’t discovered in those trials probably because it’s too rare to see. Typically a trial for an individual cohort will have roughly 5,000 - 10,000 participants. Myocarditis appears in roughly 1 in 90,000 kids.