Buying a property in Spain - please help

Hi. One of you had to deal with the purchase of real estate in Spain. I would like to buy an AirBnb apartment, but I don't know what the whole process looks like. I will add that I live in the UK. Could someone help me? Thank you and best regards.

PS. Is it a good investment at all, or is it better to buy an apartment in Poland in a student city. ?