Arduino MKR ZERO as SPI Master

Hi, I have a sketch with an Arduino MKR ZERO as the master and an Arduino nano as the slave. I’ve managed to do this Nano to Nano. The MKR ZERO will receive information but in a weird way. If I send 1234 it comes as
Received
1
Received
2
Received
3
Received
4
Received

Here is the Master side

#include<SPI.h>

volatile bool flag = false;
char x;
int CS = 14;
void setup()
{
  Serial.begin(9600);
  
  SPI.begin();
  delay(100);
  SPI.setClockDivider(SPI_CLOCK_DIV8);//1 MBits/s
  //pinMode(SS, OUTPUT);   //at defualt SS is output and HIGH
  digitalWrite(SS, LOW);  //Slave is selected
  pinMode(CS, OUTPUT);
  //--------------------
  attachInterrupt(digitalPinToInterrupt(7), ISRINTZERO, LOW);
}

void loop()
{
 if(flag == true)
 {
  Serial.println("Received");
  Serial.println(x);
  flag = false;
 }
}

void ISRINTZERO()
{
  digitalWrite(CS, LOW);
  x = SPI.transfer(0x00);
  
  digitalWrite(CS, HIGH);
  flag = true;
}

and here is the slave side

#include<SPI.h>

void setup()
{
  Serial.begin(9600);
 // SPI.setClockDivider(SPI_CLOCK_DIV16);//
  pinMode(SS, INPUT_PULLUP);  // ensure SS stays high for now
  pinMode(MISO, OUTPUT);
  SPCR |= _BV(SPE);
  SPCR |= !(_BV(MSTR)); //Arduino is Slave
  pinMode(9, OUTPUT);
  digitalWrite(9, HIGH);
  SPI.attachInterrupt();   //interrupt logic is enabled
}

void loop()
{
  byte n = Serial.available();
  if(n !=0)
  {
    char x = Serial.read();
    SPDR = x;
    digitalWrite(9, LOW);  //sending IRQ signal
    digitalWrite(9, HIGH);
  }
}

ISR(SPI_STC_vect)
{
  ;
}