How did Joseph-Louis Proust know what gases weighed?
He knew because he weighed them

This might seem ridiculously obvious but the early pioneers of modern atomic theory based the idea on actual results they got from weighing things before and after reactions.

It is perfect possible to weigh a container full of gas if you have an accurate enough balance (the buoyancy of the air cancels out if you use the same vessel for different gases). Note that the idea of a vacuum was developed in the 17th century so was well-known by the time of Proust and he could also have measured the empty weight.

The idea is simple: fill a vessel with some gas and weigh the vessel very accurately. A litre of oxygen weighs about 1.5g which is large enough to measure and with good equipment and technique large enough to measure accurately. A liter of hydrogen would be a little under .1g, a big difference.

A series of careful experiments like this with a range of gases would reveal something about the weight-ratios and carefully counting weights and volumes before and after reactions would tell you more (2 volumes of hydrogen react with one of oxygen, for example).

This is what people like Proust did, though with equipment we would now regard as primitive. The reason why it isn't mentioned a lot in modern descriptions is probably because it seems too basic and simple. Nowadays we just teach the theory not so much about the careful experiments that came first and actually led to the theory.