Current Iranian regime cannot blame their economic problem with Western sanction since it is only in energy sector Iran gets sanction.
They can still use their oil and gas for domestic needs, while many countries are basically net oil importer like Turkey, Indonesia, Pakistan, Bangladesh etc while in the meantime they can do trade freely with another countries in non oil and gas sector.
Any way, Iran also still supply some countries with their oil and gas like to Turkey.
What made you assume that US sanctions are only targeting the sale of Iranian oil? In fact, Iran is and has been for many years the most heavily sanctioned nation on earth. These sanctions go way beyond the oil sector.
You have extensive, cumulative financial sanctions against the Iranian banking system, which basically makes any sort of foreign trade and investment difficult if not downright impossible.
There's also the fact that the US regime claims extra-territorial applicability of its national legislation, meaning they will unilaterally sanction any entity, private or public, that conducts business with Iran in a wide range of domains, by closing off the American market to the entities in question. The extreme majority of companies will consider the more lucrative US market as a priority over Iran, so given that Washington is forcing them to choose between the two, they will opt for America.
This has led to a situation where even pharmaceutical companies either hesitate or refuse to export medicine to Iran. Thank God Iran is producing 97% of its pharmaceutical needs domestically, but among the items not locally manufactured, there are a few extremely specialized drugs for rare and sometimes fatal diseases. An example is the so-called butterfly disease, a rare pathology affecting children, whose treatment calls for a specific sort of bandage produced worldwide only by a sngle Swedish company. And that company stopped exporting to Iran because of US sanctions. As a result, a number of children died in Iran.
Now the reasons why Iran is standing strong and progressing steadily despite all these draconian measures, unlike Iraq which crumbled under sanctions in the 1990's, are several fold:
1) As you correctly noted, Iran has a large domestic market it can rely upon for economic growth.
2) Iran's rich human capital, its vastly developed higher education system as well as its impressive R&D sector, which have consistently been supported by the state authorities since the Islamic Revolution.
3) Sound agricultural and industrial development policies, despite certain shortcomings.
4) An anti-imperialist, revolutionary state ideology stressing self-reliance and belief in domestic capabilities no matter the odds. This prerequisite is important, because historically Iranian elites have been divided as to the question whether the country can stand on its own feet or whether it must depend on major outside powers to fulfill its potential in terms of development. Proponents of the latter view used to dominate under the toppled Pahlavi monarchy, whereas those adhering to the former standpoint took over in 1979 with the establishment of the Islamic Republic.
5) The existence of export markets in countries allied to Iran, which are also sanctioned by the west (Syria, Venezuela etc).
6) The fact that Iran has numerous neighbors, and that stealthy trade can take place under the US radar (barter is sometimes resorted to, and in some cases even mules or individuals on foot for transportation).
7) Isolation from and weak integration into the international financial system implies greater immunity to global crises like the great recession of 2007-2009.
8) A large enough expatriate community that is staying in touch with their homeland and having a presence in major global economic and financial hubs (London, Frankfurt, Dubai, Los Angeles, Kuala Lumpur etc).
9) Iran's unparalleled proficiency at evading sanctions through all sorts of ingenious methods and techniques. Indeed, Iran may be in pole position among sanctioned countries, but she's also the global champion in sanctions-busting.
10) The progressive rise of emerging powers like China and Russia after two decades of unchallenged US hegemony post-Cold War. These rivals of the west are themselves getting sanctioned by Washington, have gained in leverage and prowess compared to the 1990's and early 2000's, and are increasingly willing to go against US diktats in order to establish their own regional economic architecture and bring about a multipolar order. Add to that traditional western allies like Turkey seeking to assert a more independent line.
And so forth.
Some links regarding the anti-Iran sanctions regime devised by the US and its allies:
https://en.wikipedia.org/wiki/United_States_sanctions_against_Iran
Practically all sectors of Iranian economy have experienced serious difficulties in their financial operations, which has opened the door for a wide array of sanctions evasion schemes.
iramcenter.org
Over-compliance with United States-imposed sanctions against Iran is harming the right to health, and people with a rare skin disease are among those affected, many of them children, experts appointed by the UN Human Rights Council said on Tuesday.
news.un.org