I think the right answer depends on what you already have and also on how fiddly you can tolerate.
Recording to cassette was never really very good on ordinary domestic equipment and the format is pretty much obsolete now. So your solution for recording is going to be something digital.
If you already have a smartphone or a tablet, then the answer could be an audio recording app. If you just want to make sure you are in time and in pitch, the built-in mic will probably be good enough. When playing back, you could connect to the stereo by Bluetooth (which might need a plug-in receiver if it's an old stereo) or else a simple cable to connect the 3.5mm jack socket on the phone to an input socket on the stereo (which might be another small jack or a pair of phono sockets).
Otherwise there are various qualities of digital recorders around which would give you a dedicated device with proper buttons. Some were discussed in this thread which might be handy:
recomendation-s-wanted-please-small-sound-recorder-t109458.html
You'd still need a stereo to listen back properly, or alternatively a simple portable Bluetooth speaker would work, provided you don't mind another device where you need to keep the battery charged up and understand how to keep it paired with the recorder. These cost from about a tenner, upwards to more than you'd want to pay.
Edited to add:
You could probably use whatever PC or laptop you use for forum posts. Pretty much every PC has sound built in. Plug in a mic to the socket with the mic symbol and speakers to the one marked speakers or headphones. (This will need to have some amplification built in. PC speakers do, so do Bluetooth speakers, which can normally be attached by a cable.)
For sound recording, editing and for playing a backing track while recording your performance, there is excellent free software Audacity, with plenty of YouTube tutorials.