you gotta make some fun curves to match the contour as close as possible. then you can either foam it or if you dont want to fuxor your window use some gorilla tape.
itll still mess with your window but less than foam
or you can cover the window with something and then foam. like aluminum foil. if you have dark enough tint you wont see it