There's a feat for this called War Caster.
And tough choices are a feature of D&D. Your character shouldn't be able to do and have everything at once. Without decisions to be made, you're just rolling dice.
War Caster's second bullet point only applies to somatic components, it still doesn't help if the spell has material components.
So it is great for the corner cases of paladins and clerics wanting to weapon and shield as they can always cast no matter the combination, but it doesn't help an eldritch knight or ranger that wants to cast while having weapons in both hands or weapon/shield really as they still need a hand free for material components if the spell requires them.
It is all kind of goofy, and imo best just to handwave these things especially if they take the War Caster feat.