Given these are rather old planes, with a wide international distribution, I'm kind of expecting it's not too hard to find second hand parts cannibalized from retired planes and coming from neutral countries.
They were even able to smuggle parts to keep some of their F14s flying. In comparison, civilian airliner parts surely are easy to get.
Cuba is flying Russian except for a few ATR 72. I guess finding parts after 60 years to keep these Super Constellations flying is beyond reasonable.
These two countries are in a bit of a pickle actually. Parts can only help you up to a point, they will need new planes. With the EU and US mostly aligned and inter-dependent anyway, if you are under embargo, the only place you can get a full aircraft is Russia, but their industry is lagging behind (particularly engines and avionics). Their most modern planes cannot be built without using western parts currently.
China might be another provider in the future, but they are still dependent on foreign parts, engines in particular.
And in both cases, while they have regional jets (ARJ21 and Sukhoi Superjet) and 737/A320 equivalents (Comac 919, Irkut MC-21), the long range offer is more sketchy (Soviet era IL-96 and still in design phase Comac 929).
But what is fascinating is how Islamic Iran managed to keep these planes flying, including through an 8 years long war, despite the embargo and the lack of parts.
Through back-channel deals with Israel or even the US (Iran-Contra deal) or good old smuggling exploiting mismanaged military surplus handling in US, plus domestic reverse engineering & production, the Iranians were incredibly resourceful in getting parts for these birds.
In comparison, finding parts for civilian planes is a piece of cake.
Iran is flying mostly western planes, and there were plans to buy more:
https://en.wikipedia.org/wiki/Iran_Air#Future_fleet_plans
DPRK is only flying Russian planes:
https://en.wikipedia.org/wiki/Air_Koryo#Current_fleet
As a reminder, Russia lost overnight 78 planes:
https://www.reuters.com/business/aerospace-defense/russia-sa...
(Of course, Russia also seized planes that were on its territory )
And due to other sanctions and boycotts, lessors are unable to keep their contract up and be paid from Russia (so, Russia is either forced to return the plane, or seize more... Since they already got comprehensively sanctioned, there's not much point in the former)
Also, of course in the long term some countries are going to try to rely more on domestic/friendly production, but Sukhou planes apparently have lots of foreign parts, so switching to use only Sukhou isn't feasible nor a silver bullet