How to fix a worn part.

So at first, the tray wouldn’t open or close. I got that fixed, however, it doesn’t read that it opens. So after taking it apart, I found that inside the disk drive the part r12 is quite worn down. and when playing around with it, I don’t understand how it could even hit the part that would let it read as open. Long story short, I need a fix ar replacement for r12 and maybe an explanation of how that part even works. Thanks.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0