Exactly. There’s a minimum 4 weeks that can be increased in the employment contract. Going up to 3 months is not rare, depending on the industry/type of job.
And it works both ways, so if the employer wants to fire you, the same notice period applies.