Why Do I Keep Finding Bugs Near My Windows?
Windows can become a gathering point for insects for several reasons. That doesn't necessarily mean they're entering through the glass or the window itself.
By Everyday Home Advice Editorial Team

Windows can become a gathering point for insects for several reasons. That doesn't necessarily mean they're entering through the glass or the window itself.
Light attracts some insects
Indoor and outdoor lighting can draw insects toward windows.
Check the surrounding opening
Look for visible gaps around screens, frames, trim, and nearby penetrations.
Moisture
Condensation or moisture around windows can create conditions attractive to some pests.
Are they coming from inside?
Some insects may originate elsewhere in the home and simply move toward light.
Identify before treating
Don't spray an unidentified pest repeatedly without understanding where it is coming from.