The eternal question: should I rent or buy? There's no single answer. It depends on your situation.
Renting: flexibility but no assets
You pay rent every month. It's not yours. When you stop paying, you leave. But you have flexibility: you can move cities easily.
Buying: money trapped but it's yours
You pay a mortgage every month (it's tough). But after 30 years, the house is yours. You have an asset.
The numbers
Rent 800 euros x 30 years = 288,000 euros paid. After 30 years, you have nothing.
Mortgage 800 euros x 30 years = 288,000 euros paid. After 30 years, you own a house worth probably 400,000+ euros.
The problem with renting
The bill never goes down. Sometimes it goes up. You don't build assets. Your money disappears every month.
The problem with buying
You need a 40,000 euro down payment minimum. Interest rates are brutal the first years. If you lose your job, you lose everything.
Non-financial factors
Do you want stability or flexibility? Will you stay in the same place 10+ years? Do you have savings for emergencies?
The practical answer
If you have money and plan to stay 10+ years, buy.
If you're young and flexible, rent.
If you have no choice, do what you can.
Important note
The real estate market is local. Madrid is different from a small town. Look at the numbers for YOUR market.