There are several large-scale scientific studies that do suggest that masks were, if not useless, then marginally effective, notably those from Denmark and Bangladesh. They certainly did not find evidence to suggest that mask-wearing was an effective barrier to infection.
The downside of wearing masks is fairly limited in adults, but in developing children, who use facial cues as a primary way of making sense of the world and developing, the effect is little short of catastrophic, and even UNICEF, as far back as September 2021, was begging schools to reopen after losing a total of 1,826,402,916,679 school hours, (though that plea was aimed more at general lockdown principles than masks in particular.)
Were masks beneficial in adults? Inconclusive.
Were they beneficial in children? Quite the opposite.