You can install the most current macOS version your Mac supports directly from Recovery, there's no need to start in Mavericks. The only exception to this is if the computer was never updated to High Sierra or later. Then you will get the shipping macOS version from Internet Recovery or the closest version still available. In this case likely El Capitan.
But if you do want to start with Mavericks / El Capitan, or it was never updated past High Sierra, then you would need to format the drive as HFS+, and then the update to Mojave for Catalina will format the drive to APFS automatically.
See here: link-> How to reinstall macOS - Apple Support