throw in the towel

중상급 (B2) informal

Stop trying because you have accepted you cannot succeed.

"After three failed attempts, he finally threw in the towel."