Numerous sources suggest the Egypt-Israel barrier cost about US $3m per mile when it was built in 2010-2013, and another 2% of that amount per year to maintain (wiki, Homeland Security report).
However, the last estimates by the Trump administration of the US-Mexico wall was $20m per mile (wiki), and the actual realized cost so far was around $30m / mile ($1.6B spent on the 52 miles built: source).
Since the Egypt-Israel barrier stopped 99.9% of illegal migrants from Africa (same sources as above), and that is the objective of the US-Mexico wall, why is there such a huge cost difference?
(There's inflation, but it's tiny compared to the 10x cost gap. Also a part of the cost is technology, which has become better and cheaper over the past decade.)