365chess shows this as the main line:
It looks like that takes several moves of memorization, though all the moves are nearly forced.
4...Bc5 is the 2nd most popular option, but it gets very tactical and to my eyes also ugly.
You can escape the position even earlier with...
3...Bc5
...or you can give up the Ruy Lopez altogether in favor of Petroff's Defense even earlier with...
2...Nf6
People use this trap against me very often. I am not sure how to counter it.