Far more involved than just insurance.
If it’s a UK car it can only be used for 6 months before having to be re- registered to Spanish plates in doing this you have to such as change head lights.
I think you will need a Padron from Local Council to register/Tax the vehicle or buy car in Spain
Just the start I am sure others that have gone through the process will add to this.