Cooking Pork Loins Question

So I am cooking pork for the first time and it is pink in the middle, I am worried I undercooked it. Is there a good way to tell? Was 500g, cooked at 405 C for 12 minutes and at 375C for another 15 minutes.

Also after cooking I left it out for like 3 hours before refrigerating and I have since read you shouldn’t leave it so long so I am worried I left it too far.