When the oxen stumbled, Uzzah put out his hand to steady the ark. The LORD’s anger was kindled against him, and he died there by the ark. See 2 Samuel 6:6–7.
At Nacon’s threshing floor, a crisis interrupts the ark’s transport. When the oxen stumble, Uzzah reaches out and grabs the ark of God to steady it 2 Samuel 6:6. The narrative immediately reports that Yahweh’s anger flares against Uzzah, and God strikes him on the spot “for his error,” so that Uzzah dies beside the ark 2 Samuel 6:7. These verses sit inside the larger story of David bringing the ark to Jerusalem (2 Samuel 6). The movement up to this point is celebratory and logistical: the ark is being carried along a route, with people attending and animals pulling.
These two verses present a tightly linked sequence of events. The ark of God is being transported; the oxen stumble; Uzzah reaches out and grabs the ark; Yahweh’s anger flares; God strikes Uzzah “there,” and he dies beside the ark (2 Samuel 6:6–2 Samuel 6:7).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with 2 Samuel 6:6-7, then read the surrounding section so the answer stays connected to the passage's flow.
6When they came to the threshing floor of Nacon, Uzzah put forth [his hand] to the ark of God, and took hold of it; for the oxen stumbled.
7The anger of Yahweh was kindled against Uzzah; and God struck him there for his error; and there he died by the ark of God.