The cassette looked fine
A cassette almost always looks fine, even if it is quite worn. The relative chain difference from fresh new to completely stretched out is under 1% of its length. Human eye cannot catch such small difference.
A cassette that has been used with an overly worn out chain will also become worn out, but the signs will be even less noticeable. At least, it takes a trained eye to estimate the wear. For most people, just by looking at cogs and teeth, it is usually impossible to predict if they will be skipping with a new chain, or whether it will be fine. There are (almost) no tools to measure wear of cassettes (but there are for chains).
Provided that it is indeed a wear problem and not a compatibility issue, you have these options.
- Replace the cassette and use the new chain.
- Replace only the worn out cogs. It is possible with some cassette designs, especially for older products. More recent cassettes often come as monolithic blocks where not all individual cogs are replaceable.
- Continue using the old chain and put up with the wear it creates until you get to replace everything.
- Try to "restore" the worn-out cogs by filing its teeth. The technique is described here. I tried it once, and so far I am content with the results. Obviously, there is no guarantee that it will work for you, and that an attempt to modify the cassette won't make things worse or even dangerous to ride.