I have a 5-year US visa that gives me 6 months each visit. I am thinking of doing my dental treatment (braces) here in The US. But the problem is, it takes 18 months. Can I do visa runs like to Europe or to Cuba and go back to the USA? Like 3 weeks to The Netherlands and go back to the US? I heard I can’t visit adjacent countries like Canada or Mexico. Please help. Thank you.
I have no idea what "doing [your] dental" means, but regardless - No, you can not do this.
Each time you enter the US your entry is at the discretion of the immigration staff. Even with a visa, they can choose to allow you in for the normal time period for your visa (generally 180 days for a B1/B2 visa), refuse your entry, or allow you in but for a limit time period.
US CBP has a general rule of thumb that visitors should spend as much time out of the US as they spend within it. Thus if you spend a full 180 days in the country, you would be expected to spend ~180 days out of it before returning.
If you were to return a few weeks later as you've suggested, you would almost certainly be either refused entry, or allowed to enter for a limit time period (eg, maybe 30 days). A further attempt to return after that time period was up would almost without doubt be rejected.
To add to Doc's answer, you cannot work on the visitor visa at all.
And to perform dental work in the USA you need to be licensed in the state you plan to work. As far as I know, this requires you to graduate from an approved dentistry school (which generally means US-based school), and pass the background check and the exam. And you need social security number for the background check, which you will not have on a visitor visa.
Every time you enter the US, it's at the discretion of the officer to decide if your visit is legitimately tourism, based on what you say and on your travel history recorded in their system. However, it's probably not seen as a normal tourist activity to stay for 18 months to get braces done. It also depends on how long you're staying in the US on each visit---but again it's at the officer's discretion; there's not a specific cutoff. If you only visit the US for a couple days every month for 18 months, that's almost surely fine. If you stay five months then leave for a couple weeks and want to return for another five months, it could be a problem. Although there is a rule about treating short trips to Canada/Mexico/adjacent countries differently, that's less relevant than the officer's perception of your intentions.