Spanish is the dominant language in Mexico but you may be surprised to learn that it is not “the” official language. There are many indigenous languages such as Nahuatl and Yucatec Maya. The government recognizes all indigenous languages and must provide official documents in those languages if requested. In the southern part of the country, I met people who could speak no Spanish; only their indigenous language.
Many individuals do speak English, but unlike the indigenous languages, it has no type of protection. If you enter into a contract or need official documents, you will need to have an official translation. In one instance, I needed a copy of my birth certificate and even that very simple document needed to be translated by an official translator. If there is a dispute, any real estate contract or other contract will be determined by the Spanish language (or possibly the indigenous language).
The English language is very important in tourism and business so you will find many English speaking individuals in tourist areas or big cities. In Mexico City and Tijuana, I see signs everywhere advertising English language classes. The major companies and stores almost always have individuals who can help in the English language. I do not need it now, but in the past, I was always able to get someone at my bank, the Internet company, or the phone company who could speak English if I was patient and friendly. This was especially important on phone conversations because that is the most difficult place to communicate with no body language to give clues.
The more rural areas, it may be impossible to find anyone who can speak English. You can still get by if you want.
You can get along without speaking Spanish --- but it is much easier, if you, at least, learn the basics. The people of Mexico are friendly and try to understand even if you only speak English, but they really do appreciate someone who attempts to learn the language. My first trips to Mexico, I could not speak any Spanish --- I “got by” with no problems. But I feel that my experiences become richer as I learn to speak more Spanish.