Yes but Israel built walls at hot-spots on the borders with the Gaza Strip and the West Bank. Those are very short walls. The USA / Mexico border is just under two thousand miles long. That is a much bigger project. Seems like a very big undertaking when a more effective and quicker result could probably be achieved using surveillance technology, fences and beefed up border patrols / helicopters etc.
Of course I am no expert so I don’t know. Its just a thought. I also thought that building an actual wall that long would provide enormous numbers of solid blue-collar jobs for a very long time period and that might make it worthwhile. Trump promised to bring jobs. Maybe that is part of the plan.