I wouldn't buy a flat, personally. They are pretty expensive yet you still have no freedom to do whatever you want, since you need to coordinate and approve stuff with the community association ("Eigentümeregemeinschaft"; all the other people in the same house owning flats). You are also typically required to still pay a monthly amount onto a shared bank account that is used by the community association for repairs, etc. So it's not even much cheaper than paying rent; and you likely still have to pay back the credit and interest for actually buying the flat (which, at that size, can easily be half a million Euro).
So basically ... you pay a lot of money for barely more freedom than when renting, you don't save much cost and you get a lot of responsibilities. In other words: if I only want a flat, I would rent it.