What you're asking is pretty much a whole field of world history in itself, namely the question of why modernization doesn't occur at the same speed or in the same ways throughout the world. Answers to this question vary depending on the researcher you cite, but I'll just give you some general considerations to help push you in other directions of research.
First off, colonialism is a big factor to consider. The South Americas have a long history of colonial rule. Political systems were set up by a foreign governing power instead of by the local population. These governments were set up with the intention of being easy to exploit, and included things like land reforms and class systems which can still be felt today.
After colonial rule, the absence of a strong central state paved the way for several authoritarian regimes to pop up, which of course isn't too great for long term development either. Even when governments were democratically elected, rampant corruption meant growth was halted as well. Consider the recent scandal in Brazil which saw a president indicted for corruption in the hundreds of millions.
Contrast this with Japan. They were almost completely isolationist for most of their history before the Meiji Restoration, allowing them to build up institutions based on their own local needs and customs. My knowledge of Japanese history isn't too great, but as far I understand it, the Japanese emperor's court selectively picked western advancements that could strengthen their empire, things like military technology and taxation practices, and adapted these technologies to local customs. They then used their new centralized government to enforce broad changes that allowed them to transition to a modern state.
This is still not close to being the complete answer. Every state has its own specific history and its own reasons for its speed of industrialisation. Both domestic and international factors have to be taken into account, and usually needs to be done on a case by case basis. Venezuela didn't develop in the same way as Brazil did, and many different factors play into the reasons why.
Lots of factors explain why some countries were able to industrialize while others didn’t.
Both Japan and Brazil were agrarian societies, with 90% or more of the population living in rural areas and working in agriculture. There’s some differences though. While Japanese agricultural workers were mainly peasants, something like 1/3 of Brazilian society in the 19th century was comprised of slaves, with another 1/3 being former slaves. Life as a peasant was harsh in Japan, Europe or the USA, but life as a Brazilian slave was even harsher. In some rural enterprises, like sugarcane plantations, the average slave life expectancy after arriving was around 4 years. After that they’d be replaced by other slaves coming from the transatlantic trade.
What this meant in terms of economy was that most of the capital of the Brazilian economy was spent either on land or buying slaves from abroad. Capital for other kinds of investment was rarer, and had to compete with this kind of enterprise. This same problem existed in the Southern USA vis a vis the Northern USA.
Also, Japan had a much higher literacy rate than Brazil. Japan in the mid 19th century had a literacy rate comparable to that of Europe: around ½ of the male population and ¼ of the female population could read and write. Brazil’s literacy rate at the second half of the 19th century and for most of the early 20th century was around 20% of the whole population. For many reasons, Brazilian elites never invested much on public education for the masses. One of those reasons was that most of the lower classes were black slaves or mixed race freed people, and Brazilian elites didn’t care at all about their well being or education.
A higher literacy rate meant higher productivity, higher chance of being able to learn to do something more complex, like working in a factory, and that’s why literacy was correlated with industrialization at the 19th century.
Regarding natural resources, Japan kind of had enough (not much, but enough) to kick start the 1st and early 2nd industrial revolutions. The main resources that were needed in those cases were coal and iron, respectively. Industrialization followed those natural resources all over the world, as can be seen in Northern UK, Ruhr Valley, Belgium, Northeastern USA, etc. Brazil, on the other hand, doesn’t have much of coal mining to this day (the only coal mine is very small and needs economic subsidies to work to this day, being irrelevant to the needs of Brazil over all its history). Brazil also only discovered its first iron deposits at the end of the 19th century, and due to government intervention (more specifically the province/state of Minas Gerais demanding that iron extraction by foreign companies be accompanied by the creation of a steel foundry) only started extracting it after 1930.
There’s the matter of political stability. Japan industrialized before it engaged in major wars, and the civil war that ended the Tokugawa regime and the Satsuma rebellion were short affairs. On the other hand, Brazil spent the first 20 years of its existence involved in many civil wars, which resulted in the loss of Uruguay, but in the keeping of the rest of the territory. Brazil also involved itself in lots of war with its neighbors, like Argentina and Paraguay, at the expense of creating a very big foreign debt (which Japan avoided at all costs), without much of monetary or territorial compensation. Japan, on the other hand, got lots of monetary compensation after the 1st Sino Japanese War from the Qing empire.
Regarding foreign trade, Japan was kind of lucky, in that its first industries, of silk products, were able to flourish at the time when the Italian silk industry faced a major supply crisis. As I said before, Japan also avoided foreign debt a lot. Brazil didn’t, and Brazil faced lots of currency and balance of payment crisis during its history, especially because of the prices of its exports (mainly coffee for the period between 1870-1960), were falling due to oversupply. Many times the Brazilian government had to deal with foreign debtholders, like Rothschild, having to endure very harsh terms.
Nevertheless, Brazil started to industrialize consistently at the beginning of the 20th century. It never achieved the level of Japan, but most of the growth between 1920 and 1970 was due to industry. The problem was mainly the model Brazil followed (import substitution, with the protection of inefficient domestic producers, instead of export led industrialization).
Sources:
Celso Furtado, Formação econômica do Brasil (1959)
Kenichi Ono, The Economic Development of Japan (2006)