I always assumed a court order payment wouldn’t be taxed
Unfortunately that is not true. The only tax-free court imposed restitution is that of physical pain and suffering not mental anguish. There may be other small caveats like hospitalization for mental but yeah, if you get a settlement expect the govt to come looking for its cut after the lawyer takes theirs.