Whenever a player casts an artifact spell, you may gain 1 life.
Unlike Golem Foundry and the Smith cycle, Golem’s Heart’s ability triggers whenever any player casts an artifact spell, not just when you do.
Whenever a player casts an artifact spell, Golem’s Heart’s ability triggers and goes on the stack on top of it. It will resolve before the artifact spell does.