Many Costa Ricans that work in tourism speak English, like in hotels, restaurants and stores located in tourist destinations. Professional guided tours are typically also available with an English speaking guide. If you plan on visiting villages and towns outside of the tourist areas, it might be a good idea to learn some Spanish.
You’ll have few problems interacting with younger people. Schools actively promote English lessons as they acknowledge it’s such an important part of the country. Foreign investment in surfing & yoga in Costa Rica makes up for a large portion of the nation’s total income. Without the ability to speak English, it would deter many tourists from visiting.
It’s the older generations you’ll have problems dealing with. English study in the national curriculum is relatively new. Older people didn’t grow up with the language and have little desire to learn it now. You might need a translator if you’re dealing with them.
Regardless of where you want to go, it will be considered a good sign if you can speak some basic Spanish: