Thinking about this you may have overpayed by too much. And they charged you a penalty.
If the first €5000 payment was a percentage of the 2023 mortgage, it would have reduced the mortgage principal so the 2024 allowed overpayment would have been less than €5000.
It would be worth discussing...