You can not install Mavericks. The 2017 MacBooks came preinstalled with macOS 10.12.5 (Sierra), so you should be able to run 32 bit software. I have used 32 bit Adobe CS5 and CS6 (basically Photoshop and other stuff) on macOS 10.13 and 10.14 (High Sierra and Mojave), but I get error messages when quitting the applications. This was not a problem with Sierra and older versions of OS X. As Mathew pointed out, if you install Catalina or a newer version of macOS, you will not be able to run 32 bit software, unless you use a virtual machine (see below).
You can install Legacy Java (Java for OS X 2017-001), if you need Java 6 runtime support. I currently have this installed on a machine with High Sierra and another machine with Mojave.
You could try installing Maverick in a virtual machine. Both VirtualBox and Fusion Player are free products. I am not sure you can still download Mavericks. Yosemite and El Capitan are both available for download from Apple. However, most users dislike the feel of a virtual machine.