The Law of Mass Conservation states that”
“mass can neither be created nor destroyed”
(All matter exists... somewhere.)
You are referring to the First Law of thermodynamics, but it says the total of mass AND ENERGY in a closed system remains constant.
But according to Einstein’s Theory of General Relativity (and our best science today), mass is merely one property time/space/energy/matter. All are interchangeable.