Until 2016 F-35 build where unable to do most tasks and a lot of them are not even worthy to be upgraded because of airframe flaws. It's 5 years of production... Block 3f upgrades are descent making the jet usefull and block 4 will be the real thing.
For the B-21, with a plane that costly and large, things need to be sorted out a lot more, at least on the airframe and engine side to be able to integrate the rest in due time.
First a lot of those older bird could be upgraded it’s just that it’s not cost effective to do so. F35 just passed 1000 built units. Concurrentcy meant that they were often making design changes well still building airframes.
Farther F35 sits in a transition. Early block F35s and F22 were built in an older manufacturing strategy. To make the big important improvements to retain the airframes to modern mission standards requires an extensive Life Extension program that digs deep into the airframes. Much of the hardware is hard coded so changes become harder. This is why the USAF has an 11billion dollar program to modernize 150 F22. They have to make new parts and fabrication of new modules to get them up to speed. Which would have also been required for those early F35.
The 3F blocks were and are on the other end of that transition with more of the mission upgrades being software updates based. In fact F35 even does over the air updates like teslas. B21 is on the other side of that transition as well, it’s also a much smaller intended order at about 100 units vs the 1700+ F35. So there is less room for aircraft that won’t be mission capable. Basically after the first 2 or 4 airframes everything has to be production ready. And some of those 2-4 will likely be retrofitted to combat spec.