>>1957476to my eye that cassette looks quite badly worn.
I would guess the chain is also badly stretched.
It's unlikely to be the cause of your skipping though.
You can get a new chain and cassette, or, you can just trash your entire drivetrain together. The parts are all worn in together and can be ridden until they do skip. Skipping will be a slipping chain, not autoshifting gears.
If you get a new cassette and chain though, it will improve shifting. And you should also service your rear hub if you change the cassette. And overhaul your jockey wheels.
The solution to your shifting problems is probably gonna be installing a new cable, and if it's bent, straightening your hanger. But it's really more about how much of a comprehensive overhaul you want to do.
I could probably fix or improve your shifting in 10 minutes but as a noob you will have an easier time focusing on broadly improving everything rather than trying to pinpoint in which way your neglected piece of shit is specifically going bad. That kind of diagnostic approach is helpful when you have skill and not time but you probably have time and not skill.