@lennonali You should think in terms of three scenarios:
The first is relatively harmless. Say you move house but fall and break your leg. As you are at the hospital, you can‘t give the keys to your landlord. Or you are on holiday but there‘s a letter that needs to be picked up from the post office. In these cases, giving someone power of attorney (Vollmacht) helps. You can either do that for specific things (Spezialvollmacht, e. g. to get your post) or to generally represent you (Generalvollmacht). This is only valid as long as you have legal capacity (Handlungsfähigkeit). Now, here it depends a bit whether you are married or not. If you are married, your spouse can do everyday stuff such as getting the post.
The second scenario is that you lose that legal capacity (e. g. because of dementia or an accident). For this case, you need a Vorsorgeauftrag, in which you can decide who can represent you regarding (1) your personal care, (2) financial matters, and (3) legal matters. This can be the same person or different ones for the different areas. If you don‘t have that, the KESB appoints a Beistand. This can still be a family member or friend but it‘s much more complicated. Also here, everyday matters can be taken care of by your spouse if you are married, but obviously in such a scenario a lot of decisions that go beyond everyday matters need to be made.
Lastly, in a will you can decide what happens with your assets when you die. You don‘t necessarily need a will. If you are happy with the standard provisions you don‘t have to do anything. Especially if you are unmarried and want your partner to get (part of) your assets, a will is needed. Being unmarried is especially „funny“ when it comes to your second and third pillars. For the second pillar, you need to check the Vorsorgereglement if and under which circumstances unmarried partners get something. Often, the partnership needs to be announced to the pension fund while the insured person is still alive. For the third pillar, you need to tell the bank using a form that they will provide you with upon request.
Regarding costs, the cheapest option is taking templates from the internet, adapting them to your needs, handwriting, dating and signing everything.