One Piece is one of the longest-running anime and manga series. The manga started publishing in 1997 and the anime came out in 1999. The story is given by Oda Eiichiro, who quickly stole the hearts of the public with his amazing art and story that tickles our fantasy.
The story revolves around Monkey D. Luffy, who gathers a bunch of crew members to set sail and explore the world.
While doing so, he also wishes to find the legendary treasure named "One Piece" and become "King of the Pirates". Luffy sets out on his journey, gathering a group of people to join his crew.
After the Marineford Arc ended, Luffy decides to meet his crew after two years. In the meantime, all the Straw Hat Pirates, including Luffy trains to the best of their abilities.

Post-time skip, we see new character designs, with each of them going through massive changes. Nami grows her hair long, Zoro has a scar on his left eye, and so on. But the most striking change was visible in Luffy when we see the massive scar on his chest.
What Happened in the Marineford Arc?

The battle at Marineford, also known as the War of the Best was a huge spectacle created by the Marines to lure Whitebeard into their territory and get rid of him. After Blackbeard hands over Ace to the Marines, they quickly announce his public execution, believing Whitebeard would come and try to rescue him.
True to their assumption, Whitebeard arrives with his entire crew. Not only that, but Luffy also joins the war with the few people he helped escape from Impel Down. The long and tormenting battle came to an end with the victory of the Marine and the deaths of Ace and Whitebeard.
Who gave Luffy this Scar?

Akainu was the one who gave Luffy his scar. As an admiral, Akainu played the most important role in the war. He is the one who directly killed Ace as the latter was trying to save Luffy.
As Luffy sees his brother dying, he quickly breaks down. He feels even more guilty since Akainu was attacking Luffy, so technically he should have been the one to die if only Ace hadn't jumped in.
Consumed by guilt and despair, Luffy even resigns to his fate and stops resisting Akainu's pursuit of killing him. However, there were several people who were on his side and they all came to rescue him. Marco and the other Whitebeard pirates try their best to save Luffy's life.

Luffy loses conscience after ace died and it was Jinbe who tries to get him out of the battlefield. As Jinbe was making a run for it, Akainu attacks him, piercing through his chest and injuring Luffy.
How did Luffy Survive the Injury?

Trafalgar Law, the Surgeon of Death helped Luffy and Jinbe escape from there. Unlike most pirates, Law has a submarine, which helped them escape Marineford easily after taking Luffy and Jinbe with them.
Law was one of the worst generation pirates at that time and barely knew Luffy. Though the duo had interacted before, it wasn't pleasant. However, Law still came to the war zone.

Being a doctor and the user of the Op Op Fruit, Law was probably the only one who could've saved Luffy's life after that massive injury and trauma. However, as a result of the injury, Luffy gets a giant X-shaped scar on his chest.
Post-time skip, Law becomes one of the Warlords and forms an alliance with Luffy to take down Kaido. Although their alliance has come to an end, Law's time with Luffy and the rest of the Straw Hats is something that the fans had loved to watch.