Messi healed from muscle fatigue and a minor strain in his left hamstring sustained during his last outing with Inter Miami on May 24, beginning the game on the sidelines.
Just days before turning 39 and marking his sixth World Cup, Messi entered the match in the 70th minute, scoring a penalty after Lautaro Martínez was fouled in the box.
The all-time leading scorer for the Argentine national team with 117 goals, Messi successfully converted the penalty with a powerful left-footed shot in the 72nd minute.
Argentina, aiming for its fourth World Cup title after victories in 1978, 1986, and 2022, will kick off its tournament against Algeria on June 16 in Kansas City, within Group J, which also features Austria and Jordan.
This was the second encounter between the two nations, the first being at the 2018 World Cup, where the European side secured a 1-1 draw, with Messi missing a penalty.