There’s this constant tension with D&D where it wants to be medieval and it wants to have easily-reproducible magic. Follow the magic through to its logical conclusion and you get essentially modern technology with a mystical/medieval aesthetic, ignore it and you get big blatant plot holes.