It’s changing all of them because you’re using get all actors of class. To change just one, you need to get a reference to the actor somehow, and run the set material function on it.
To better explain, it would help to know what condition or event should be causing the material to change. Like, should the stars change color when you shoot them with a spaceship or whatevs? Or is there a trigger box that causes it when the player pawn overlaps it?