Whenever you cast an artifact spell, Golem Foundry's first ability triggers and goes on the stack on top of it. It will resolve before the artifact spell does.

Artwork
Loading artwork…
Golem Foundry
Edge of Eternities Commander · #138 · EN
Nonfoil—Foil—
Card rules
Whenever you cast an artifact spell, you may put a charge counter on this artifact.
Remove three charge counters from this artifact: Create a 3/3 colorless Golem artifact creature token.
Common · Illustrated by Nic Klein
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
PreDH Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Penny Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions