RFID code locking Arduino UNO up

Hello, and thanks in advance. I am trying to setup a simple RFID access control circuit using an RC-522 RFID tag reader and a relay board. I have a red and a green led connected to tell me if the id tag is authorized or not when scanned and its all connected to an Arduino UNO. It is all working perfectly for about the first 15 mins I have it connected then the Arduino locks up and needs to be reset to function again. I do notice that the L led on the UNO is on constantly in a dim state like the code is moving a lot of data. any help would be appreciated!

//RFID
#include <SPI.h>
#include <MFRC522.h>
 
#define SS_PIN 10
#define RST_PIN 9
#define LED_G 4 //define green LED pin
#define LED_R 5 //define red LED
#define BUZZER 2 //buzzer pin
#define RELAY 7 // Set Relay Pin
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.

void setup() 
{
  Serial.begin(9600);   // Initiate a serial communication
  SPI.begin();      // Initiate  SPI bus
  mfrc522.PCD_Init();   // Initiate MFRC522
  pinMode(LED_G, OUTPUT);
  pinMode(LED_R, OUTPUT);
  pinMode(BUZZER, OUTPUT);
  pinMode(RELAY, OUTPUT); 
  noTone(BUZZER);
  Serial.println("Put your card to the reader...");
  Serial.println();
}

void loop() 
{
  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent()) 
  {
    return;
  }
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) 
  {
    return;
  }
  //Show UID on serial monitor
  Serial.print("UID tag :");
  String content= "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++) 
  {
     Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
     Serial.print(mfrc522.uid.uidByte[i], HEX);
     content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
     content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  Serial.println();
  Serial.print("Message : ");
  content.toUpperCase();
  if (content.substring(1) == "8B E1 A7 1B" || content.substring(1) == "63 EF EC 1B" || content.substring(1) == "08 2A 8E 5C" || content.substring(1) == "04 47 43 0B 36 4B 80" || content.substring(1) == "04 9A F5 7A 2C 5E 80" || content.substring(1) == "04 62 1B 6B 36 49 80") //change here the UID of the card/cards that you want to give access
  {
    Serial.println("Authorized access");
    Serial.println();
    digitalWrite(LED_G, HIGH);
    delay(500);
    tone(BUZZER, 500);
    delay(300);
    noTone(BUZZER);
    digitalWrite(RELAY, HIGH);     // Unlock door!
    delay(300);      // Hold door lock open for given seconds
    digitalWrite(RELAY, LOW);    // Relock door
    digitalWrite(LED_G, LOW);
  }
 
 else   {
    Serial.println(" Access denied");
    digitalWrite(LED_R, HIGH);
    tone(BUZZER, 300);
    delay(1000);
    digitalWrite(LED_R, LOW);
    noTone(BUZZER);
  }
}
  String content= "";

Don't use the String class on AVR Arduinos. The available memory will be fragmented too fast and sooner or later the Arduino will misbehave unpredictably.

I do notice that the L led on the UNO is on constantly in a dim state like the code is moving a lot of data.

That's because the Arduino is almost constantly transmitting data to/from the RFID reader. As the LED is connected to the SCKL pin of the SPI interface it shows that activity.

Thanks you for the reply, what would you suggest as an alternative to still get the same results?

Use C-strings (character arrays).