The page: https://www.arduino.cc/en/Reference/SPITransfer it does not mention that the buffer argument must be a pointer in the buffer form of the call [SPI.transfer(buffer, size)].
I think that goes without saying. The reference page says:
buffer: the array of data to be transferred
If you pass an array to to a function then it's passed by pointer automatically. Pointers are confusing to beginners (most Arduino beginners have probably never even heard of them). An array is something much more basic and beginner friendly.