If you don't delete the partitions, the old data will be stored in Windows.old.
How to: Perform a Custom Installation of Windows 11 and Windows 10 or - Microsoft Community: https://answers.microsoft.com/en-us/windows/forum/all/how-to-perform-a-custom-installation-of-windows-11/38adfa8c-32f8-4354-8c53-13b5f2cf7e44
// If I reinstall the system, what data will I lose and what can I recover? For example settings? Installed apps? History in Edge browser? Personal files? Etc.//
You may be able to recover Appdata folders for individual apps. Store apps will be gone. Though you can recover personal files from Windows.old, it's advisable to backup those folders to external drive before doing the clean install.