Loki was the last to hold the Space Stone before Thanos put it in his gauntlet.