After the Israelites safely crossed the Jordan, Joshua commanded a stone monument commemorating the event be erected at the site of Gilgal (Joshua 4:1–9, 20). These twelve stones—one for each tribe of the house of Israel—were taken from the riverbed of the Jordan and were meant to be a memorial for future generations: “That this may be a sign among you, that when your children ask their fathers in time to come, saying, What mean ye by these stones? Then ye shall answer them, That the waters of Jordan were cut off before the ark of the covenant of the Lord; when it passed over Jordan, the waters of Jordan were cut off: and these stones shall be for a memorial unto the children of Israel for ever” (verses 6–7).
Joshua’s actions here recall the practice of the patriarchs Jacob and Moses of setting up “pillars” of stones (Hebrew matzevot) at key narrative moments. These sacred pillars served a variety of functions, including as memorials, as monuments, and as ritual or cultic objects. Given the momentousness of the occasion, it made perfect sense for Joshua to erect a stone pillar after the children of Israel miraculously crossed the Jordan. The next chapter indicates that the male Israelites born in the wilderness were also circumcised at Gilgal, thus introducing a ritual or covenant component to the site and its monument (5:1–9).
The stone monument was placed at Gilgal, just east of Jericho (4:20). The children of Israel were camped on the west side of the Jordan River, thus slowly infiltrating Canaanite territory. The narrative now ratchets up the tension as the Israelites prepare for their first encounter with the local Canaanite potentates. Per the instructions given earlier in the chapter, Joshua reiterated the purpose of the stone monument: to remind future Israelite generations of their national triumph at the Jordan (verses 21–24). The symbolic link with the Exodus tradition is also explicitly reiterated: “For the Lord your God dried up the waters of Jordan from before you, until ye were passed over, as the Lord your God did to the Red sea, which he dried up from before us, until we were gone over” (verse 23).
 For example, at Genesis 28:18, 22; 31:13, 45; 35:14, 20; Exodus 24:4.
 See the discussion in Richard E. Turley Jr. and Stephen O. Smoot, “Record-Keeping Technology among God’s People in Ancient and Modern Times,” Interpreter: A Journal of Latter-day Saint Faith and Scholarship 42 (2021): 104–107.