I bought a pair of second-hand wheels, and after removing cassette noticed these notches on the freehub. Is the freehub still in OK condition?
The bumps on the freehub splines are caused by steel cogs on the cassette digging into the softer aluminum metal on the freehub.
You can use a file and file down the ridges, once, maybe twice without affecting performance too much, but eventually you will want to purchase a new freehub.
Depending on your needs, you can purchase a steel freehub and this issue shouldn't be a problem.
I have exactly the same problem on an aluminum freehub after using a cassette supposedly installed with lockring's torque not high enough:
A proper prevention measure would be using a fully steel freehub body or at least a freehub with steel ribs similar to these below, in addition to torquing the lockring properly:
A new steel hub body, however, may be expensive or unavailable. In my case, it is ~95 € for a new steel hub body vs ~66 € for an aluminum one.
A corrective measure after the problem was discovered was described to me on another bike forum. It is as follows: find a source of thin steel pins. They should be thin and long enough to be able to wedge them in between the cassette and the hub body so that they become a makeshift anti-bite guard splines.
One possible source for such pins are stapler pins, separated and straightened:
Another potential source of steel ribs suggested to me were springs coming with QR-skewers; to straighten, cut and use them.
The suggestion with pins sounds reasonable to me, although I cannot yet comment on its efficiency and longevity. It may not apply to all cases as there may be not much space between the cassette and the hub splines to wedge things in.