at STP, which 4.2g sample of matter uniformly fills a 500 ml closed container?

I have a sneaky suspicion here that you haven't posted all of the problem but I'll play along. I assumed a gas. At STP a gas will occupy 22.4 L/mol. So

22.4 L/mol x ?mol = 0.5 L
?mol = 0.5/22.4 = 0.0223
Then mol = g/molar mass and
0.0223 = 4.2/molar mass
molar mass = 4.2/0.0223 = about 188
So all you need to do is to come up with a gas that has a molar mass of 188.
Of course a liquid will uniformly fill a container, too, but with no density I didnt go there.