How and when Shanks got his scars from Blackbeard
There are three instances where Shanks’ eye is smartly hidden by Oda:
At Rogers execution – Chapter 0 / Strong World
When asking Buggy to join him – Chapter 434
Recruiting Yasopp – Chapter 0 / Strong World
So when did Shanks get his scar from Blackbeard? Oda gave us some new clues in the Uta’s Special 1-Page Manga.
Shanks found Uta inside a treasure box when she was only two years old. Uta’s current age is 21 and Shanks is 39 so Shanks was 20 back then and he got no scar on his left eye.
Shanks had the famous scar that Blackbeard gave him when he was chasing the World Government ship and planning to loot it and it happened 12 years ago when he was 27.
Thus proving Blackbeard gave Shanks the scars when Shanks was between age 20 to age 27.
I’d like to point out that the Gomu Gomu no Mi and the Yami Yami no Mi look very similar in colour and shape. Now Blackbeard in his hunt for the Yami Yami no Mi hears/sees that Shanks obtained the purple devil fruit and mistakes the Gomu Gomu no Mi for the Yami Yami no Mi.
Blackbeard goes and fights Shanks and whether Blackbeard overpowers Shanks or somehow sets a trap is unknown but somehow Blackbeard gave Shanks his scars. After this, Shanks would recognize Teach as a real threat, to the point of warning Whitebeard about him.
At Marineford the two confronted each other and Shanks addressed Teach in a tense manner. Teach was initially surprised at seeing him again but was amused at being called out by Shanks before he mocked him for the scars he inflicted on Shanks. Teach, seeing that he already had what he wanted and that he was not yet ready to face Shanks, decided to retire, which Shanks accepted.
Although the reason is still unknown, Shanks seems to be looking for Teach, since the reason he had gone to Wano was because he expected Teach to be there.