The four-digit display shows the numbers from left to right

I wanna ask about that what should i do because i have this so far… I am using arduino rich shield

 if (checkInputNewPress())
      {
        messageDisplayedOnce = false;
        enteredDigits[digitIndex]++;
        if (enteredDigits[digitIndex] == 5) enteredDigits[digitIndex] = 4; //digit may only be 1,2,3 or 4

      }

   
      //Display.showCharAt(0, '1', digitIndex);
      if (checkConfirmNewPress())
      {
        entryIsCorrectSoFar = true;
        for (int i = 0; i < 4; i++) {
         if (enteredDigits[i] != correctDigits[i])
          {
            entryIsCorrectSoFar = false;
          }
        }
        digitIndex++;
        messageDisplayedOnce = false;
  }
      
      

  

      if (digitIndex == 4)
      {
        digitIndex = 0;
        for (int i = 0; i < 4; i++) enteredDigits[i] = 1;
        if (entryIsCorrectSoFar == true) currentState = ST_UNLOCKED;
        else
        {
          currentState = ST_LOCKED;
          Display.show("----");
          redBlip = false;
          redFlashAt = millis();
          redFlash = true;
          digitalWrite(REDLED, HIGH);
          Serial.println("You made at least one mistake, sorry");
          entryIsCorrectSoFar = true;
        }
      }

I don't know what an "arduino rich shield" is.
That is a code snippet, not the entire code.
I don't know what you intended.
I don't know what this does versus what you wanted.
I don't know what Arduino you have.
I don't know how things are wired.

Other than that, it is a perfect post. Good Luck!

Read this post. Especially #6.