This is why HPV vaccination for boys was much delayed compared to girls. As a public health measure, vaccinating boys obviously makes sense because as likely future sexual partners they can give the girls HPV and thus induce cervical cancer. But, from a medical ethics point of view that's not beneficial to them at all, why should they care if some one night stand they never saw again dies of cancer?
However, once there was enough data to say that vaccinating boys likely protects them from non-cervical cancers induced by HPV, yet significant side effects were very rare, that's a clear benefit to giving them a vaccine, while the public health outcome (fewer women die of cervical cancer) means it makes sense to spend money on delivering it.
So, it can be true that vaccinating all 12 year olds would benefit public health e.g. by reducing the amount of disease spread in the community, while at the same time being true that vaccinating them wouldn't be ethical because the risk to them is similar to or greater than the benefit of not getting COVID-19 when you're young and healthy and very likely to survive with few problems.