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.

crwdns2893858:0crwdne2893858:0 crwdns2893862:0crwdne2893862:0

crwdns2894050:0crwdne2894050:0

crwdns2889612:0crwdne2889612:0 0
crwdns2892346:0crwdne2892346:0