Anyone entering Spain from any country that is not on the Green list will have to pay for a private covid test 72 hrs before arrival and it must be negative. This starts 23rd November for the forseeable future or your departure country has got a green code.