Even if you had to wait a long time for the answer and apparently no one has an opinion on this, you will get feedback from us.
Regarding the [Photovoltaik Anlage], you probably mean a solar system for water heating, meaning you use the sun to heat your drinking water. The [Photovoltaik Anlage] exclusively generates electricity, but if there is a suitable area available, it might also be interesting for you, but that is a topic for another time.
There are several strategies to reduce your heating costs. The first measure would be to fundamentally reduce your consumption. You can achieve this through improving energy efficiency. It is possible to renew the windows, insulate the facade, and much more. The use of new heating technology is also possible. If the gas heating system is already old, perhaps 10–15 years old, a pure replacement might be considered. Modern gas condensing boilers from, for example, Wolf, Weishaupt, or other reputable manufacturers cost around €5,000. Savings of 20–25% are possible depending on the age of the system being replaced. I find Wolf reasonably priced. Depending on your budget, solar support (not photovoltaic!) might be conceivable. Pure hot water support is available for €3,000. It becomes more complex with pellet heating. Do you have space to store the pellets? If not in the apartment, a pellet tank in the garden is an alternative, but also more complex. Overall, you have to expect an investment amount at least in the five-digit range. There are subsidies for pure boiler replacement, solar support, and pellet heating. However, since more people are currently claiming the funds, it may be that the pot is empty when you decide. So don't necessarily count on it as fixed. In terms of investment, you will definitely be cheapest with the gas heating system; even with solar support, the system is probably still a few thousand euros cheaper than a pellet heating system.
Also take a look at [Initiative Erdgas pro Umwelt]. There you will find some information about photovoltaic and natural gas condensing technology.