However if you have tight time to market constraints then hiring someone with experience in the stack you already have might be more important to optimize for than long term amortized costs. However if you are having trouble finding a candidate then you may waste more time finding someone than it would take a good engineer to ramp up on the framework and stack.
I know 2 startups both hiring their first set of non-founder engineers.
One startup took 4 months to hire 2 senior engineers who weren't in their stack and then gave both of them about a month to come up to speed on the tech. Literally running tutorials.
So 5 months in, they have two onboarded senior engineers.
The other startup is 6 months in and hasn't made either hire. They see deep experience in their tech stack as required and don't want to wait longer for onboarding.
But in retrospect, they would have gotten to an onboarded team faster if they had hired like the first company.
the staff developer had very narrow experience doing software and made almost everything he wanted in a "library" way or in a "micro service" way until he got bored and started doing mono repos
because of this the CEO or founder, had a very bad impression on hiring and of course it was unrealistically to hire someone who had experience in the stack and in dealing with the ego of a lone wolf programmer which I believe can be as high as a Hollywood artist some times