c# – Why the update function only call once

I asked about this question How to efficiently implement a 7-segment display? in previous post. Now I just add an update function to the last part of the code to display the time(I don’t bother the exact time at the moment just want to make sure the number change regularly). However,I’m not sure why the update only run once, I checked the answer in this website, mentioned the root cause is gameobject deactivated(Update function only running once) but this is not my case. I tried with void OnMouseDown(){Display(DateTime.Now.Second)}, the number does change according to my mouse button so I’m not sure what wrong with Update function. In addition, I assigned all the variable but it still pop out message unassigned reference exception, not sure where the problem.

using System;
using UnityEngine;

 public class ClockDigit : MonoBehaviour

{

//  Assuming you number your segments as follows:
//   -- 0 --
//  |       |
//  5       1
//  |       |
//   -- 6 --
//  |       |
//  4       2
//  |       |
//   -- 3 --

// Store a lookup table for which segments 
// should be active when displaying each digit.
static readonly bool(,) SEGMENT_IS_ACTIVE = new bool(,) {

    {true,  true,  true,  true,  true,  true,  false}, // 0
    {false, true,  true,  false, false, false, false}, // 1
    {true,  true,  false, true,  true,  false, true }, // 2
    {true,  true,  true,  true,  false, false, true }, // 3
    {false, true,  true,  false, false, true,  true }, // 4
    {true,  false, true,  true,  false, true,  true }, // 5
    {true,  false, true,  true,  true,  true,  true }, // 6
    {true,  true,  true,  false, false, false, false}, // 7
    {true,  true,  true,  true,  true,  true,  true }, // 8
    {true,  true,  true,  true,  false, true,  true }  // 9
};

public Color32 activeColour = Color.red;
public Color32 inactiveColour = Color.black;

public SpriteRenderer() segments = new SpriteRenderer(7);


public void Display(int number)
{
    var digit = number % 10;
    if (digit < 0) digit *= -1;

    for (int i = 0; i < 7; i++)
    {
        if (SEGMENT_IS_ACTIVE(digit, i))
        {
            segments(i).color = activeColour;
        }
        else
        {
            segments(i).color = inactiveColour;
        }
    }
}

  public void Update()
{
    Display(DateTime.Now.Second);
           
}

}

I tried this command also, the infinite loop freeze the Unity and FixedUpdate() command also update the frame only one time.

void Update()
    {while(true)
      Display(DateTime.Now.Second);
    }

enter image description here