אֶת־שְׁנֵ֥י הַמְּאֹרֹ֖ת הַגְּדֹלִ֑ים אֶת־הַמָּא֤וֹר הַגָּדֹל֙ לְמֶמְשֶׁ֣לֶת הַיּ֔וֹם וְאֶת־הַמָּא֤וֹר הַקָּטֹן֙ לְמֶמְשֶׁ֣לֶת הַלַּ֔יְלָה וְאֵ֖ת הַכּֽוֹכָבִֽים:
And G-d made the two great luminaries: the great luminary to rule the day and the lesser luminary to rule the night, and the stars.
Based on Midrash Rabbah and Chulin 60b, Rashi explains: that first it refers to "two great luminaries" because oriringally the sun and the moon were equal. But the moon was made smaller because it brought charges and said, “It is impossible for two kings to use the same crown.”
The stars are then also mentioned after the moon is described as the smaller luminary because they came to accompany it at night after it was diminished.
A few months ago I thought of this take on the stars' role to support the moon. Though the actual number of stars is unknown to us, there is a specific number …