For buying masks, 'Do you have any masks?' sounds most natural
When asking about masks, the most natural expression is "Do you have any masks?" By contrast, "Do you have any masks to buy?" is grammatically awkward, because the implied subject of 'to buy' becomes 'You,' so it can be read as if the listener is the one buying masks.


