Nick Fury is one of the most interesting characters that Marvel has to offer, known in the MCU for bringing the Avengers together. Although he isn't a superhero and doesn't have a costume or any distinguishing logos, he does have an iconic eye patch. In the Captain Marvel movie, he sustains the injury to his eye when an alien disguised as a cat scratches it. However, the origin of his lost eye in the comics is much more interesting.
The story of Nick Fury's eye injury was first told in Marvel Spotlight (1976) vol.1 #38 (by Jim Starlin and Howard Chaykin) and was shown through a flashback of France during World War II. Fury's eye injury is part of a bigger story. During the war, he was evading the Nazis when he unknowingly stumbled into a minefield and was caught in an explosion. He sustained many injuries, including one to his left eye, but even worse, while he was being treated by a man called Professor Sternberg, he was experimented on.
However, to his advantage, he had been given the gift of extended life via a 'longevity serum' called the Infinity Formula, but this comes with a caveat. If he didn't get an annual booster, he would age 60 years overnight and potentially die. This concept brought a lot more depth to Fury, taking a regular person and giving him a pseudo superhero status. But his prolonged life would force him to watch the people he cares about age and die before him.
The idea of a regular person being given powers is a familiar concept to Marvel fans thanks to one of its most popular heroes, Captain America (aka Steve Rogers). Rogers was a frail young man with the heart of a hero, who wants nothing more than to serve his country during World War II. He gets injected with a super-soldier serum by a scientist during the war, turning him into something much more special. The parallels between the two stories are obvious, and given the connection of the characters, it makes Nick Fury's origin story far more compelling.
This story adds a lot more layers to the character instead of just being some guy who was scratched by a cat. Instead, he sustained the injury by being blown up in a mine during a war while he was working as a spy, which gives him much more intrigue. Not only that, but he also gains a superpower. Nick Fury was already interesting, but this storyline and origin elevate him by quite a bit.
Considering the comic was written and set in the 70s, it was definitely a smart idea to use the war and the Nazis because it grounded the story in reality, making it somewhat relatable and forging a connection with the readers. For example, maybe a soldier, looking for characters to relate to and finding just that in Nick Fury. Or maybe the children of those soldiers, seeking ways to understand their older relatives. Writing a story in this setting offered readers a relatable escape from a terrifying reality, bringing a sense of comfort and hope to those who needed it the most.