All health insurers, both public and private, may increase their premiums due to general rising costs of medical services and technologies. They can not simply increase the premium though—they must justify the increase and comply with the law in order to get a premium increase approved. Private insurance premiums have risen on average around 3.3% a year since 2014, while public insurance premiums have risen by around 2.8% annually in the same period.
Once you're registered for a policy, your insurer may not increase your premiums based on changes to your health status (e.g. if you are diagnosed with a chronic disease) or age. For private insurance to keep premiums stable, a portion of your monthly payment is placed in an "ageing reserve" fund. This is what distinguishes German insurers from providers elsewhere in the world, who are generally not required to do this.