I’m not sure how you exit the loop.
find the red key for the red lock the key is hidden in cracked walls