Mjølnir was a powerful enchanted war-hammer forged by the Dwarves for the Asgardian Royal Family, and was used by Odin before he passed it down to Hela and then Thor. The hammer was used extensively by Thor as his primary weapon until it was destroyed by Hela in 2017 after she was freed from Hel.
Five years after the Snap, Thor time traveled to an alternate 2013 and brought that version of the hammer into the main timeline's 2023, where it was primarily used by Steve Rogers during the Battle of Earth. Following Thanos' death, Rogers traveled back in time to the alternate 2013 timeline and returned Mjølnir.