Good quality pellets are made in different head sizes. In .177 they are often available in 4.50, 4.51, 4.52, and 4.53 mm head sizes. In .22 they come in 5.50, 5.51, 5.52, 5.53, 5.54, and 5.55 mm head sizes. To further complicate things, not all pellets in a given tin have the same head size, regardless what it says on the tin; but most of them should be very close. And to further muddy the waters, one manufacturer's head size may not be the same as another's.
Although not relevant here, it is worth noting that pellets from different manufacturers are made of different lead alloys, with the result that this affects how a particular brand of pellet -- together with head size, pellet shape, and pellet length -- responds to different barrels. Also worth noting is that different individual barrels even from the same manufacturer may have some variation in exact bore size. That is to say one HW 97 in .22, for example, may favour one head size of a certain pellet, while another HW 97 may shoot a different pellet better.
Anyone seeking accuracy with an airgun, whether it is a rifle or a pistol, would be well advised to test quality pellets of different head sizes from different manufacturers.