How did Tony Stark create an Infinity Gauntlet in Avengers: Endgame? Is it not a given that the Gauntlet must be enchanted or else the dwarves would not be required to create it?
Magic is just advanced science.
As Thor explains to MCU lynchpin Jane Foster in his first movie, magic is just sufficiently-advanced science. Tony, presumably with Bruce's help, figured out how to make an Infinity Gauntlet from first principles.
Iron Man is smart, really smart, presumably, he just figured it out (with some help from Bruce).