Rear derailleur cage hits largest cog on cassette
The inner plate seems to be on upside down. Not sure why but if it's second hand, maybe someone dismantled it to clean it the put it back the wrong way round.

If you need to swap it around you just need to undo the screws holding the jockey wheels in and flip it, then reinstall them. Its a bit tricky with the chain tension, but if you can do it without removing the chain, all the better.

Maybe drop the chain off of the chainring at least, to loosen some of the chain tension.

Make sure you get the chain routed correctly around the little tab on the inner plate, which is about halfway between the jockey wheels.

Also check the jockey wheels go in the right place and spin the right way; thanks to Carel in the comments, “If there's a difference between the top one and the bottom one there should be an inscription and an arrow with the sense of rotation.”