Your employer cannot withhold your final salary if you have served your notice period.
The notice period gives both parties time to plan for a smooth transition, including handover arrangements. As a responsible employee, you should also play your part by completing your duties before leaving employment.