I criticized US health officials mercilessly for that, in March 2020. It was clear what they were doing at the time: they were trying to prevent a run on masks, in the face of low supply, in order to preserve the masks for use in the setting where they were most crucial: healthcare. But lying for a good cause still undermines trust. I ignored their advice at the time and wore masks, and encouraged others to do so.
However, as angry as I was about it, at the time, I have to admit it didn't end up mattering. Sure, the low-IQ set will sometimes now point to that as the reason they distrust Fauci, but they're lying. They distrust Fauci because Trump bashed him and they're lemmings who will mirror any tantrum they see from Dear Leader.
For me, the smoking gun is that they're nearly all the same people who bash the effectiveness of masks today.... once again, channeling Dear Leader. They're not people who believe in the effectiveness of masks and so hold it against Fauci that he spoke against them. Rather, they're people who believe whatever the cult leaders of the right are saying, whether that's that masks don't work or that Fauci is a liar for saying they don't work.... and, being morons, they don't even require internal logical consistency in those positions they take.
So, Fauci was definitely playing with fire when he undermined health-official credibility by lying about masks. But, it didn't end up mattering. The low-IQ set was going to distrust him equally either way, and the rest of us have long since gotten over it. We never regarded him as an infallible cult figure the way Trumpers do with Trump. We regarded him as one of a wide array of expert voices, and when they're unified on a point (as they weren't on masks, at the time, but as they are on vaccination, now), we're convinced.