As the storyline progresses, Lillie's Cosmog with the name of Nebby will once again evolve into Cover Legend of Pokemon Sun, Solgaleo. Eventually, Necrozma will capture and fuse with Solgaleo in order to turn into its Dusk Mane Form. it will then take things one step further by later reaching its Ultra Burst, thus turning into Ultra Necrozma. After defeating Necrozma in its Dusk Mane Form and later as Ultra Necrozma, you will ultimately save Solgaleo from Necrozma's grasp.
After saving it, Lillie and Lusamine will take it back to the Aether Foundation to heal it, as it is very weak after being absorbed by Necrozma. However, after encountering Gladion at Mount Lanakila, he will mention how Solgaleo is now healed and how Lillie is back with Nebby on Mahalo Trail. When you go there, Lillie tells you that she thinks it's best for Solgaleo to travel with your player since she's not a trainer. You will then battle Solgaleo in hopes of capturing it.
Solgaleo will be at Level 60 for this battle, continuing to have its Full Metal Body Ability and being a Psychic/Steel Type Pokemon. It will know the moves Sunsteel Strike, Cosmic Power, Crunch, and Zen Headbutt.