Hi, you do that the same way you show/hide anything in Unity. You will need a reference to your gameobject, and once you have that you can simply gameObejct.SetActive(false) to hide it.
GameObject star1; // drag a reference to star1 here
if (...) {
star1.SetActive(false); // to hide it
}