I think you mean this portion:
public class StarDisplay : MonoBehaviour
{
[SerializeField] int stars = 100;
Text starText;
void Start()
{
starText = GetComponent<Text>();
UpdateDisplay();
}
private void UpdateDisplay()
{
starText.text = stars.ToString();
}