The surgery was done on the 26-year-old after palpitations.
Mazraoui was substituted off the field at halftime of United’s goalless draw with Aston Villa the previous Saturday.
A Manchester United representative said, “Weussair is expected to make a full recovery and be available for selection within the next few weeks. This is a relatively common condition.”
Palpitations “feel like your heart is racing, pounding, fluttering or like you have missed heartbeats,” according to the British Heart Foundation.
According to the organization, they are usually not harmful, but if examinations turn up an underlying cardiac issue, treatment is needed.
After leaving Bayern Munich for United in a transfer costing an initial €15 million (£12.8 million), Mazraoui has made ten appearances this season.
He has experienced cardiac problems in the past. He was diagnosed with a slight infection of the pericardium, the membrane surrounding the heart, one month after testing positive for COVID-19 during the 2022 World Cup.
Mazraoui has become the latest in a long line of United defenders to be out.
In addition, Harry Maguire left the game at halftime of United’s draw with Aston Villa due to a muscle ailment and is anticipated to miss many weeks.
The two join Tyrell Malacia, Luke Shaw, and Leny Yoro, who have all been missing for a while.