retrace your steps means:if you've lost something and you need to find it, you would try to remember where you were and you would go from there. e.g, if i lost my phone at the park, i would go back...
Yes, I lost my favorite shirt so I had to retrace my steps. is a pretty good sentence. You can improve it by doing this: I lost my favorite shirt, so I had to retrace my steps to find it.