Of all the weapons to appear in the Marvel Cinematic Universe, Thor's mighty Mjolnir is arguably the most hotly debated. Its history in Marvel Comics lore has changed many times over the years, but the film version keeps the story fairly clean. Thor acted like an arrogant jerk, so Odin placed an enchantment upon the weapon so that only one who was "worthy" could lift it. Thor was banished to Earth and stripped of his powers, and he needed to prove his worth in order to pick up his weapon and regain his godly abilities.
Source:https://www.cbr.com/vision-lifting-thor-hammer-iron-man-suit/