We strongly advise against travelling to the USA with an Iranian or Russian visa in your passport. Most of the time, "conflict" destinations offer to affix a visa to you on a loose leaf to be kept in your passport for the duration of your trip. This avoids the need to keep a record in the passport.
The USA is quite wary of travellers who have spent even a short time in Iran, Cuba (even with a tourist card and especially since 2020), Venezuela or who hold a Russian visa (among others), at a time when diplomatic relations are tense. Our advice also applies to destinations where relations with the USA are healthier - but complex - with other countries such as Israel.
The fact that you have visited these countries will not pose a problem when you apply for ESTA. It may, however, give rise to an in-depth examination when you arrive in the USA.
However, if you have already visited the following countries : Iran, Iraq, Libya, North Korea, Syria, Somalia, Sudan and Yemen since 1 March 2011, and Cuba Since 12 January 2021, you cannot apply for an ESTA, but it is advisable to contact an American consulate to apply for a visa.