The vaccines significantly reduce the severity and duration of covid. Reduced severity translates to a lower risk of complications, including myocarditis. It doesn't have to prevent infection completely to protect you.
No it doesn't. The study was the outcome of the vaccine irrespective of what happens after you get the vaccine. Get a full covid infection? Still counted. Get no infection? Still counted.