I went here: https://tradingeconomics.com/commodity/soybeans
I inspect element of the soybean price, visible on the right side.
Then I find the number in the dev tools panel, right click and copy Xpath, or copy full xpath.
Then I passed the xpath into a fomula.
=IMPORTXML("https://tradingeconomics.com/commodity/soybeans", "//*[@id="p"]/text()")
OR
=IMPORTXML("https://tradingeconomics.com/commodity/soybeans", "/html/body/form/div[6]/div/div[2]/div/div[1]/div[1]/div/div/div[1]/table/tbody/tr[9]/td[2]/text()")
But I get an error either #NA or #ERROR!
Later I tried here:https://www.indexmundi.com/commodities/?commodity=soybeans&months=60
But this also didn't work:
=IMPORTXML("https://www.indexmundi.com/commodities/?commodity=soybeans&months=60", "//*[@id="futuresPanel"]/span")
I also made several tests with that site and got the error:
Could not fetch url: https://tradingeconomics.com/commodity/soybeans
The issue is that the data you're trying to import is dynamically loaded. This data is loaded by JavaScript, therefore is not retrievable by IMPORT functions in Google Sheets. You can refer to this thread for more details.
I also found another thread regarding the same website and reports the same issue, it seems the website does not allow web scraping.