Opening windows is generally recommended.
Opening windows is one way to increase ventilation. Ventilation is good because it allows new air to come into a room and old air to go out. The old air is more likely to concentrate things like viral particles.
You might choose to keep your windows closed if you have seasonal allergies because the pollen outside can make your symptoms worse when it comes inside. In that case, one way to increase ventilation is to use an air conditioner that has a “recirculate” mode that keeps the indoor air moving without bringing in outdoor air.
World Health Organization, Ventilation and airborne diseases. [Accessed 22 April, 2020].
Atkinson J, Chartier Y, Pessoa-Silva CL, et al., editors. Natural Ventilation for Infection Control in Health-Care Settings. Geneva: World Health Organization; 2009. Annex C, Respiratory droplets. Available from: https://www.ncbi.nlm.nih.gov/books/NBK143281/