Of course, tax has to be paid on the transitional compensation / severance pay you receive. How much tax you have to pay depends on your annual income. In 2023, there are two rates applied:
Annual income up to €73,031 you pay 36.93% tax
Annual income from €73,031 you pay 49.5% tax