We have read that nowadays it is also possible to heat with geothermal energy, but we have no experience at all. How exactly does it work and would you recommend it to us?
As nordanney wrote ... Actually, you can find the answer to your question with the search engine of your choice. Links are not allowed here, so you have to google it yourself :P
Drilling: requires a permit, expensive, not always possible, ...
Surface collectors: As a rule of thumb, you need the same area in your garden as your house occupies. There, a long pipe is laid in a loop at a shallow depth (just frost-proof), in which a heat carrier circulates. You cannot build on top of it or plant deep-rooted trees. However, it is rather cheap and basically trivial (you can possibly lay it yourself, a small excavator is enough).
Both methods work in normal soil or in groundwater-bearing layers. Differences in detail ...
Would I recommend it? It depends on the soil conditions. Personally, I would rather not do it. Preferably an air-to-water heat pump and a well-insulated house. Or gas condensing boilers, which unfortunately require other measures (if you build in Germany), possibly making an air-to-water heat pump more economical then. It depends.
HTH