One big reason I can think of for why Cosmog is 0.1 Kg is that it is the Nebula Pokémon. What are Nebula's made out of? They are made out of Gas which is very light and and not very dense in most ca ses. Also, Cosmog collects dust in.the atmosphere. Dust is also very light as well.
Source: https://m.bulbapedia.bulbagarden.net/wiki/Cosmog_(Pokémon)
Now, Cosmoem is known as the Protostar Pokémon. As I learned in Science last year, Nebula form.into Protostar, which then become a star once Nuclear Fusion happens. And just like any big body out in Space, it is extremely heavy. Hence, because of Cosmoem's relation to being a space body with a large amount of mass, this explains why Cosmoem is so heavy and Cosmog is so light.
Hope I helped!