Major spoilers for Avengers: Endgame ahead.
Avengers: Endgame reunited many characters, including the reunions of those who died in the Infinity War snap with those who survived. But there was one reunion that really surprised fans, and gave Captain America the best ending fans could have asked for. In Endgame, Cap was able to go back in time and live out a full life with his best girl, Agent Peggy Carter. Steve and Peggy don't get married in the comics, so this happy ending is one even fans of the original source material couldn't see coming.
In the final moments of Endgame, Steve Rogers heads to the past to return all of the Infinity Stones, he makes a decision to stay in the past and finally live out his life. What Tony Stark had made — a family with Pepper and Morgan — clearly gave Steve the desire to finally get that too. He gets the best of both worlds: passing the torch to Sam (aka Falcon) by giving him the Captain America shield, while also living out his days married to his one true love.
The last shot of the movie sees Steve finally getting his dance with Peggy in what's presumably their house. It's a satisfying ending to what is truly one of the best love stories in the MCU (and also ever), but a marriage between the two isn't something that's canon in the comics.
According to the Marvel Fandom website, the original Peggy Carter also loses Steve before they can live a life together. She was a prisoner to the Gestapo during WWII and was later saved, only to be hit with a blast that gave her amnesia. She was recovering when she found out Captain America had "died," and never married after that. In the movies, she does go on to marry and have children with someone who Captain America had saved in WWII, however it's never revealed who that was.
Of course, Captain America wasn't truly dead, and what happens to his character in the MCU is pretty true to what happens in his comics: he's thrown into icy waters and his superhuman strength allows him to survive until he's found decades later. Even though, in the MCU, Steve and Peggy had to go through a lot of hardships apart, their happy ending is a gorgeous tribute to their characters.
There are other iterations of Peggy Carter's character in the comics, one being from Earth-415 in the Marvel Future Fight: An Eye on the Future comics from 2017. In that iteration, she does marry Steve Rogers, per Marvel Fandom. They also have a daughter, Sharon Rogers, who becomes a S.H.I.E.L.D. agent, just like her parents, and inherits the role of Captain America. But that isn't exactly the same Captain America or Peggy Carter that have been depicted in the MCU.
Regardless of what the source material says, it seems that Peggy and Steve lived happily ever after in the MCU, and that's all Steggy fans could have hoped for.