Before you install the new chain to test –
clean the cassette, and have the chain in hand – possibly wheel off the bike. Place chain on each cog and move it forward and back and note how much the chain moves on the teeth on each cog.
If there are some cogs that are markedly more worn – meaning the chain moves much more on the teeth, then replace cassette even if it does not skip yet. If you have some worn cogs (ie. if you tend to use some gears much more than others on the cassette), they will wear out the new chain extra fast.
But if the movement fore-aft on the teeth is not too great on any, then the cassette will still be good to go. Depending on cassette (Shimano) has some of the small cogs available as spares sets, if you have just one-two of the smallest cogs more worn. For 11-speed, there are even up to 4 smallest cogs available as spares.