Where does mass come from?

Mass is simply a concentration of molecules. Where it comes from is complicated, but (I think) easy to understand…

You probably think of weight as easy to understand. You weigh a certain amount. Mass is that same number without the consideration of gravity.

Your weight is different, whether you are on the moon, or on the earth, but your mass is the same.