How can you install Windows 7 on a 2017 MacBook Air running macOS Catalina? I want to install Windows 7 (not 10) on my 2017 MacBook Air, which is running macOS Catalina. I want Windows 7 since some programs I need don't work the best on Windows 10. It's also faster than Windows 10 and takes up less of my hard drive space.

Is it even possible to install Windows 7, and if so, how?
Windows 7 has to be installed to BIOS boot. Your 2017 MacBook Air does not have a BIOS in the firmware. Therefore, you can not install Windows 7 on a physical 2017 MacBook Air.

You should be able to install Windows 7 in a virtual machine. VirtualBox happens to be a free product that can be used to run Windows 7 as a virtual machine. Usually the older operating systems run adequately fast in virtual machines on newer Macs. 

The latest version of Windows 7 with SP1 can be downloaded from Download Windows 7 Disc Images (ISO Files). You will need a product key to download. This ISO can be installed in VirtualBox without entering a product key, if you want to test before committing. Of course, after a trial period, you would need to provide a product key. VirtualBox does provide all the required Windows 7 drivers, which can be installed after installing Windows 7.