Try installing insulated foam tape
Insulated foam tape is a nice alternative if you have a gap at the top of bottom of a sliding window. If you have a side sliding window, then the left and right of the window are well suited for foam tape.
The foam provides insulation or a buffer so cold air can not enter the house, or warm air can not escape.
If you choose to go this way, make sure you test the tape first. Sometimes it may leave a nasty residue. Also, a lot of times the tape isn’t easily removed. On the other hand, sometimes it comes apart too easily.
Tape with foam on one side generally comes in varying thickness. Make sure you get the right one for your window. If you get one too thick, you may not be able to close the window! One too thin will allow gaps.
Ideally, I found that either ¼ inch or ½ inch insulated foam works well with most of my sliding windows.
I also found a variation of the foam tape, felt, can be useful. Felt doesn’t come as tape, but it still comes in a roll. It has to be tacked, nailed or stapled on, but this isn’t difficult. The trick again is the get the right sized felt for the job. Usually, felt works best around door jambs where foam tape won’t fit (you may need something thinner, like felt.)