It is hard to stop such a downward spiral with a falling economy and rising inflation. Relying on one export good like oil is not enough to sustain a whole country. Another big factor in Venezuela is corruption, it prevents that necessary funds are actually used for investment into education and infrastructure within the country.
The current situation in Venezuela makes me think about my own country, which is one of the largest oil producing/exporting states and yet one very corrupt country in the world, concentrating solely on oil may be counterproductive, but it's not really too bad, what's worse is when the revenue being generated from it isn't put into good use, it then becomes a situation were the country is using up it's only valuable resource, but Instead of the proceeds to be used for the development of the country, it is going straight into the pockets of a few 'privileged' individuals.
It's a pretty difficult situation Venezuela finds themselves presently, and tbh, I do hope things in my own country do not get as bad as that, corruption is really the bane of many countries and their economies, if people in power can more often than not, put the needs of their people first, then many countries would prolly not be struggling economically today.