it's on the Spanish government website somewhere.
I'm a bit confused about what it is you're doing though. As an EU citizen you can work in whatever field you want.
However, if you're applying for residency in Spain as a UK national then you need an appropriate visa. Off the top of my head there's the Non Lucrative (effectively retiral based on having a set minimum of financial resources) , the student visa, a self employed visa , a key worker visa and a digital nomad visa. All come with certain conditions and have varying degrees of difficulty in acquiring. Quite a bit of information here
loads here but not very user friendly
Royal Decree 1155/2024: Summary of Key Updates and Structural Reform Royal Decree 1155/2024, of November 19, approves the new Regulations of Organic Law 4/2000, on the rights and freedoms of foreigners in Spain and their social integration. It introduces a range of substantive and procedural...
www.citizensadvice.org.es
Just as a general comment I disagree with many of your reasons for wanting to leave the UK and you won't find Spain any better. There is minimal welfare system, families are expected to look after themselves. The medical situation is fantastic in Spain but again, you're expected to do much of the work for any inpatients i.e. physical nursing. Taxation is higher in Spain for normal workers with less allowance than the UK. The grass may not be greener if you haven't done your homework.