In order to store data in an organized manner, operating systems now give you a feature to create separate partitions out of your HDD or SSD based storage. Microsoft has always been supporting this ...
All this is assuming you can still boot into Windows 11/10 in a regular way. If you cannot, the only way is to use a bootable USB drive. You can then use the advanced recovery. Reset Windows Format ...