Maybe it's just me, but apart from the largest sprocket and the smallest one that is mostly obscured, that cassette looks to be clearly well worn with an obvious deformation of the teeth at the pressure point! Defo need to bin the whole cassette, shame you ruined a good chain.
The chain will be fine.
Old chains quickly wear out new cassettes, but old cassettes don't rapidly wear out new chains.