8x8 LED Matrix on Arduino Nano

I hope I didn't mess this up too much (haven't tried to compile it)

Instead of your loop() I would do something like this:

int data[8] = {
  0b10000000,
  0b01000000,
  0b00100000,
  0b00010000,
  0b00000110,
  0b00001001,
  0b00001001,
  0b00000110
};

int currentRow = 0;
void loop()
{
  digitalWrite(ROWS[currentRow], 0); // Prevent ghost image

  currentRow++;
  currentRow = currentRow % 8; // Wrap around to first row

  // Prepare columns for the active row
  int value = data[currentRow];
  for(int col = 0; col < 8; col++)
  {
    digitalWrite(COLS[col], (value & 1) == 0);
    value = value >> 1;
  }

  // Activate the row
  digitalWrite(ROWS[currentRow], 1);

  delay(10);
}

Anodes should connect to the rows, cathodes to the columns.