Formatting your hard disk and performing a fresh installation of macOS will delete all the apps (both Apple and 3rd party) which are installed on top of fresh install of macOS.
As per your requirements, you can take either one of the following two approaches:
Erase your hard drive and reinstall macOS
Create a brand new administrative user account and delete all the other accounts in the system.
However, irrespective of whichever two of the above approach you take, make sure to backup/move all your data from the MacBook (primarily from under your home directory), sign out of all the Apple services from your account (iCloud, iMessage, iTunes, Mac App Store), remove any saved Wi-Fi passwords and other sensitive items in the Keychain and unpair any paired Bluetooth device(s).
If you take the second approach from the list above, all the installed apps (other than the ones available in a fresh install of macOS) will continue to remain available on your Mac.
However, as mentioned by @nohillside, there may be licensing issues for commercial apps.
When following the second approach, you'll have to login once into the new account and delete all the accounts from Users & Groups in System Preferences.