A better solution would be to charge all drivers the exact cost to run their cars including all road maintenance for the roads they use and the cost to the health system and environment that their cars create.
Then provide multiple options such as rail and bike lanes. People will naturally gravitate to the best solution.
I often see complaints about how this will raise the cost of products like food because they need a lot of road and fuel resources. But the thing is you already pay for this cost through other means. By charging the true cost the price of an apple may go up but the price in your tax goes down. And this way the seller of the apple is now incentivized to source the apple locally and reduce the transport costs because its no longer paid for by everyone.