Would be worth you specifying the frame's BB type.
Buying a used cassette is a mug's game, but maybe someone has a cassette and associated chain with "very little wear" which you trust.
Worth specifying gear range desired as I assume you'll want at least an 11-36 cassette - the guy I caught and rode with today had a 40 ring and an 11-42.
A 1x might be easiest sourced by using a double and mounting a chain guard instead of the large ring.
If 1x won't you need a wide-narrow?
Almost any 9 or less RD will do: they all have the same shift ratio.
"any 6 to 9 speed RD will work perfectly with either 6, 7, 8 or 9 speed shifter. Regardless whether it’s a MTB, or road shifter, or RD."
https://bike.bikegremlin.com/1278/bicycle-rear-derailleur-compatibility/