According to Part 4 of Article 8 of the Law of Ukraine "On the Legal Regime of Martial Law", the property of citizens can be forcibly alienated for the needs of the state. Therefore, seizing a car during martial law is completely legal. But this does not mean that the state can take away a car from anyone just like that. In order for such withdrawal to be legal, there must be grounds. And the seizure itself must take place in accordance with the procedure for the alienation of private property.
It should be remembered that during the war, the military and transport duty applies to the bodies of executive power, local self-government bodies and enterprises, institutions, and organizations. That is, if there is a need to withdraw cars for the army, it will primarily concern the subjects listed above. And only in exceptional cases can the vehicle be seized from citizens. Therefore, the chance that your car will be forcibly taken away is minimal.