In principle, you are not entitled to a salary increase, as the salary is negotiated individually between the employer and the employee. Even if this seems unfair in many cases, this is the legal situation.
However, there are exceptions if a collective agreement or a works agreement is in place that stipulates a special remuneration system that provides for a salary increase. If there is systematic unequal treatment of employees, for example better or worse treatment due to gender or skin color, the legally defined prohibition of discrimination also applies. In addition, the salary must of course not be below the minimum wage. If the minimum wage is adjusted by law, you are entitled to the increase.