You make that sound so simple. There's no way I could bring a bike on the bus or train I use to get to work.
But if yours don't, another option would be a folding bike. Which apparently works even on crowded Japanese trains:
https://hokkaidowilds.org/traveling-with-a-tern-folding-bike...
So perhaps you should be angry at your local policy makers from preventing you from being able to bike part of your commute.
What policy? Please show me an example of such a thing.
It will likely still be more cost effective than driving all the time because you are unwilling/unable to take a bike on the bus/train.
A fold up https://us.brompton.com/ is a very good bike.
They make an e-bike version if you’re not a strong cyclist and if you put it in a bag, then it’s just a bag shaped thing you are taking with you.