Hugo Broos' men looked to settle into the contest but were punished early after losing possession in their own half, with Julian Quiñones capitalising on a mistake by midfielder Siphephelo Sithole to break the deadlock after just nine minutes.
The task became even tougher in the second half after two red cards reduced them to nine men and Williams admitted Bafana received a harsh introduction but stressed the team must quickly regroup ahead of matches against Czechia and South Korea.
"We obviously didn't want to concede in the first 20 minutes, but that's exactly what happened. We wanted to settle the nerves and anxiety but if you make a mistake at this level they will punish you. There are a lot of lessons we can take from this, we need to analyse our mistakes and not give up because there's still two games to play."
The skipper added that Sithole and Themba Zwane getting sent off could have been due to their failure to manage their emotions.
Williams insisted that coach Hugo Broos’ tactics spoke to how they expected Mexico to set up but were unfortunate to lose the way they did on the day.
"Most of the games Mexico played in the last year they played with a back five as well. We wanted to go with the same approach, but have an extra number in the midfield. They obviously changed and came with a back four, we had a good game plan but we made that mistake in the first half and that allowed them to get on the front foot."