How star collisions forge the universe’s heaviest elements