The cosmic pokemon, Cosmoem, will arrive in Pokemon Go for the first time during the Evolving Stars Event. The event runs from October 5 at 10 AM to October 11 at 8 PM local time.
Cosmoem is a Psychic Legendary Pokemon, and is the evolution of Cosmog. Players can trigger the evolution by spending 25 Cosmog candies, which can be obtained by completing a new Special Research unlocked during the Evolving Stars Event.
That means you need to have Cosmog already in order to get Cosmeon. Cosmog can be obtained by players via completing Season of Light’s first Special Research.