Windows reinstalls the core operating system, removes your installed applications, and resets your Windows settings. Documents, Pictures, Videos, Desktop, Downloads, and other personal files stored directly under C:\Users[Username]\ are kept. Your standard user libraries and files located on your desktop remain available after the upgrade.
The AppData folders, including AppData\Roaming, AppData\Local, and AppData\LocalLow, are not retained as part of the new Windows installation. The upgrade process moves the old profile data into C:\Windows.old\Users[Username]\AppData. Your applications will not automatically use this old application data after you reinstall them. If needed, you can manually retrieve relevant application data from Windows.old and copy it into the new AppData folders.
Similarly, C:\ProgramData is treated as application data rather than personal data. Its contents are not retained in the active installation, although the upgrade process may preserve them under C:\Windows.old\ProgramData. You may need to manually retrieve specific application data from there after the upgrade.
Note that if your existing in-place upgrade is already failing during the SAFE_OS BOOT phase, choosing "Keep personal files only" may not resolve the underlying problem. The SAFE_OS phase can fail because of incompatible or problematic drivers, storage or partition issues, or third-party security software. Since this type of upgrade still operates with and replaces parts of the existing Windows installation and drivers, the same underlying problem could cause the upgrade to fail again.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin