Both HEPA filters and N95 respirator masks are decades-old technologies. And yet when COVID-19 broke out everyone suddenty seemed very confused about how they worked. In particular, false claims have been made that respiratory viruses (flu, covid etc) are "too small" to be stopped by filters.
This isn't true. One error is of course that viruses are in the air in aerosol droplets that people have breathed out, and the droplets are larger than individual viruses. But a second error is a misunderstanding of how filters work; the idea that they "sieve" large particles out of the air and let smaller ones pass. This idea is very wrong.
The currect mental image is not a sieve; it is a sticky maze.
Imagine that you were forced to walk through a maze. How does it slow you down?
The first issue is that there's no straight-line path through the maze. You will have to wander through its twists and turns in order to get through it.
The second issue is that it's dark in the maze; you can't see where you are going or plan your route. So you have to wander at random, periodically bumping into a wall.
The third and most fatal issue is that the walls of this maze are very sticky. If you bump into a wall, you will make no further progress; you will stick there.
It should be clear that under these conditions you will not get through the maze. And the width of the passages isn't really relevant. The corridors of the maze can be more than wide enough for you to enter; you still won't leave.
And that's how a filter can stop everything from dust to droplets, viruses and spores.