"Seatbelts everyone!"
"Oh, please let this be a normal field trip answer!"
"With the Frizz Cosmoem!?
NO WAY!!"
Cosmoem is the "Protostar Pokémon." This follows its line's theme of heavenly bodies — Cosmog being a nebula and Solgaleo/Lunala representing the sun and moon, respectively. For reference, a protostar is an incredibly dense ball of gas that will eventually form a star. And when I say incredibly dense, I mean incredibly. Density is the distance between atoms. The less space, the more dense a substance. This is why solids are more dense than gases in their natural states. However, a protostar is a relatively small clump of millions of gases, and has a humungous mass for its size.
According to this .edu website, the mass of a protostar is around 0.1 solar masses. Over time, the protostar accumulates more gas and grows in mass. In 2013, scientists discovered a protostar with a mass of around 500 solar masses. You're probably wondering, how big is a solar mass? Well, one solar mass is equal to the mass of our Sun. This means that protostars — which, I remind you, are not even stars yet — can be anywhere from a tenth to 500 times the size of the Sun. That is massive! And then, remember that density bit? All those billions of kilograms of gases are packed together with relatively little space. This makes the protostar very, very dense.
Imagine, if you will, the Eiffel Tower. It weighs 7.3 million kg. Now, imagine taking the Eiffel Tower and squishing together all of the atoms until it fit in the palm of your hand. It would still weigh 7.3 million kg, but it would be extremely dense. Black holes are like this. When a star dies, all of its mass collapses into a singularity. That singularity is so dense it rips a hole in space, or something that. I'm not a scientist. Anyways, my point is that the more something weighs, the more dense it becomes as its size decreases.
I got off track, back to Cosmoem. Cosmoem is 4 inches tall. It weighs 999.9 lbs. The only other Pokémon that weighs that much, Celesteela, is over 30 feet tall. This means that Cosmoem is much, much, much denser than Celesteela. Imagine Cosmoem being the protostar, and Celesteela being the star — same mass, different size, different density.
TL;DR Cosmoem weighs 999.9kg because it is based on a protostar. Protostars are super dense baby stars that have a lot of mass squished into a small space. Cosmoem is only 4 inches tall, adding to its inspiration from protostars.
I hope this does answer your question. If you have any questions, well, I'm not an astronomer or physicist so I may not be able to help, but I'll try.