I was fighting the same issue, and tried all of the recommended fixes (wsreset, repair/reset store, in place upgrade, etc.) and all failed. I was seeing Error Code 0x80073cfe on the failed installs, which indicates a corrupted repository. I finally found my solution to Error Code 0x80073cfe embedded in the defect link below on github. As noted in the defect, the other option is a clean windows install (losing all your data and apps!), so messing with the databases became a good option to try, rather than a windows 'do-over'. The O/S I was using was Win10 Pro.
Figured out how to fix Windows Store/winget corrupt repository · Issue #4513 · microsoft/winget-cli
I was able to use sqlite3 to do integrity checks as noted in the defect (i.e. PRAGMA integrity_check) on the .srd files in C:\ProgramData\Microsoft\Windows\AppRepository. (They start with StateRepository-) In my case, it was just a corrupted index, and I was able to use the sqlite3 reindex command on a copy of the corrupted .srd, and copied it back to the original name to fix my issues.
As suggested in the defect, make copies of the .srd files before you mess with them in case you need to restore them if you mess up your attempt to recover from the error! I also made a full image backup of my boot drive before I attempted any of this...
Note that the databases are owned by 'TrustedInstaller'. I was able to find an app called 'advancedrun' that allowed me to open a CMD.exe shell as 'TrustedInstaller' so I could mess with the .srd files without changing the ownership, or using a linux live boot to get to the .srd databases to correct them.