The F5 was a US military aid fighter during the Cold War. It had a small fuselage, limited range, and its aerodynamic design was only at the 1960s level. Iran tries its best, it can only upgrade to the F20 level.
MiG29 is a project that Russia has abandoned, and its production equipment has been idle for many years. Iran can buy it very cheaply.
Moreover, the MIG35 has been upgraded with digital fly-by-wire flight control, 1553B data bus, AESA radar, and RD93MA, a new fighter.
If the Iranians could spend a little more money to purchase the MIG35 technology, then Iran could easily have a standard 4.5 generation fighter.
This has nothing to do with the budget. The money Iran spent on the F14/F5 is enough to make its own MIG35