Chains and Cassettes do not need to wear together. The durability of a chain is a fraction of that of a cassette. It is a myth that they need to be replaced together.
I have three road bikes and five sets of wheels. Each set of wheels has its own cassette. I swap those wheels out among my three bikes regularly and occasionally with my wife's bike. I never worry about swapping the chains. When a chain is worn, it gets replaced. When a cassette is worn, it gets replaced. It's as simple as that.
It is more than OK to pair a new cassette with a used, but not worn out, chain, or a new chain on a used, but again not worn out, cassette.