You can buy markers that are made to write on windows including car windows and then you can easily remove that marker from the car windows.
Or you can use nail polish to write on car windows and then use nail polish remove to remove the nail polish from the car windows which is what I've used before.
You can also buy Window Paint brand CHALK MARKERS that work great for writing on car windows.
Regular markers including permanent markers can also work to write on windows and then use the nail polish remover to remove the permanent marker on the windows.
However it's best to use the specially made markers for writing on windows.
Walmart and other hobby stores sell window markers to write on windows and even online you can buy them.