If you re-read the quote a bit more mindfully you may come to the conclusion that these are two different statements and therefore you should find them in different sources as to the first part you may find it as an extract from for example the hadith in Sunan ibn Majah:
It was narrated from Shaddad bin Aws that the Messenger of Allah (ﷺ) said:
“The thing that I fear most for my nation is associating others with Allah. I do not say that they will worship the sun or the moon or idols, but deeds done for the sake of anyone other than Allah, and hidden desires.” (Sunan ibn Majah, qualified as da'if)
A longer and a bit different narration appears in al-Mustadrak of al-Hakim for Nishapure -see here in Arabic- in al-Bayhaqi's Sho'Ab al-Iman -see here in Mirqaat al-Mafateeh in Arabic- and imam Ahmad compiled in his Musnad -see here in Arabic- a similar narration of that of ibn Majah.
In none of these narrations the word "stars" is quoted, while some may quote "stone/rock" too. According to this source-identification in Arbic on Islamweb the hadith appears also in abu Nu'ayms' Hilyat al-Awliya' and in Tabarani's al-Mo'jam al-Awsat and al-Kabir. The hadith mainly addresses the topic of riya' (ostentation) and hidden desires. Other hadith compilations in that list like Tareekh Dimashq of ibn 'Asakir didn't quote the wording, but these two topics which are quoted in longer versions like that of al-Mustadrak.
It seems that the second narration is an interpretation of:
“The thing I fear most for you is the lesser shirk (polytheism), showing-off (of good deeds).” Related by Ahmad with a good chain of narrators, (Source Bulugh al-Maram)
And Allah knows best.