my Arduino Board stops working after I use the rfid reader to open a relay.

I have tried three different Arduino boards, 2 Nano’s and 1 arduino mega 2560. I can get it to unlock my solenoid one or two times but after that Arduino board stops working. It stays running so long I scan the wrong RFID chip but as soon as I start scanning the right chip the board just seems to lock up. I don’t know if there’s something wrong in the code or what. P.S. I’M on a Mac

#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 53
#define RST_PIN 49
#define LED_G 5 //define green LED pin
#define LED_R 4 //define red LED
#define BUZZER 2 //buzzer pin
#define ACCESS_DELAY 2000
#define DENIED_DELAY 1000
#define RELAY 3 //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(RELAY, OUTPUT);
pinMode(LED_R, OUTPUT);
pinMode(BUZZER, OUTPUT);
noTone(BUZZER);
digitalWrite(RELAY, LOW);
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 < 0x10 ? " 0" : " ");
_ Serial.print(mfrc522.uid.uidByte*, HEX);_
_ content.concat(String(mfrc522.uid.uidByte < 0x10 ? " 0" : " "));
content.concat(String(mfrc522.uid.uidByte, HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();
if (content.substring(1) == “F0 09 5B 56”) //change here the UID of the card/cards that you want to give access*_

* {*
* Serial.println(“Authorized access”);*
* Serial.println();*
* delay(500);*
* digitalWrite(LED_G, HIGH);
_ digitalWrite(RELAY, HIGH);_
delay(ACCESS_DELAY);
digitalWrite(LED_G, LOW);
_ digitalWrite(RELAY, LOW);
}*_

else {
* Serial.println(" Access denied");*
* digitalWrite(LED_R, HIGH);
_ tone(BUZZER, 50);_
delay(DENIED_DELAY);
digitalWrite(LED_R, LOW);
_ noTone(BUZZER);
}
}*_

First look at this Read this before posting a programming question and add code tags to your post to stop it being turned into italics

How is the relay/solenoid wired and powered ?
Please provide details of the relay/solenoid