No member called "setFrequency"

It looks like the code was written specifically for the ESP8266 and/or the ESP32. As the error indicates, the AVR version of the SPI library used for your Uno does not have a setFrequency function. You might find the equivalent documented here: