This isn't true at all. Yes, I will admit that Nicolas Maduro is a corrupt politician, and I have a lot of complaints about him. He is a very incompetent person himself who didn't do much to save his country, and his actions aren't excusable. But the idea of Venezuela being the "richest nation until socialism ruined it" is far from the truth.
Venezuela was a resource heavy country and it got rich by EXPLOITING its own people and selling their oil to richer countries such as the United States. So while Venezuela was rich, their people lived in poverty as the country didn't care about them. And yes, it was ruled by dictators as well.
Until 1998, the country was ruled by a 2 party system that held a monopoly on the country's political system, and didn't care about its own people, only the rich and the money they made from selling oil to other countries. Combine that with the financial incompetence they had caused them to endure financial debt that caused them to adopt even worse policies that further made things expensive for the already poor people of Venezuela, which contributed to the rise of Hugo Chavez in 1998.
Hugo Chavez is actually not a terrible person, despite what many think of him, and kept winning landslide elections due to his immense popularity, despite claims of election fraud, which were proven false by many organizations, including the Carter foundation in the U.S.
He helped alleviate the national debt, used the country's oil industry to finance programs to help deal with widespread poverty, lack of education and literacy, and its crippling healthcare system, which was resolved by the following decade, helping a lot of people by the end.
But he has issues, his overreliance on the oil industry, (a symptom of Dutch's Disease), as well as his financial illiteracy caused the country's economy to decline and eventually collapse by the late 2010s. That I won't excuse, this was incompetence. But combining the sanctions and economic warfare by other western nations further crippled its economy, worsening it.
So while I do think Venezuela has its issues and is facing a corruption crisis (that has nothing to do with the economic system of socialism), an overreliance on the oil industry, and widespread sanctions by other nations, you must consider the context of how the country came to be. You may criticize the country as you like, but you got to consider the context and the past events that led to Hugo Chavez and Nicolas Maduro to gain power.