I've had no issues running minecraft (besides occasional crashing) until I repaired my curseforge installation. After repair, when attempting to launch my profile, it said "loading patches 2/6" or something similar before giving me an error at the bottom of the app saying "Forge Modloader installation failed." After that I reinstalled curseforge. It then allowed me to open my mod profile, but when I got to the minecraft launcher and launched the game I got error code 1. Vanilla 1.21 from the vanilla launcher works just fine without errors. I attempted to uninstall and reinstall Java, and I believe it was successful. Graphics drivers are up to date. The minecraft loading screen closes everytime after reaching the "scanning mod candidates" part. I am not sure what repairing my curseforge installation did, but it made it so I am unable to open minecraft. I do not believe it is an issue with my firewall since I have never had an issue like this recently before repairing curseforge unless the repair changed something.
I've looked everywhere and nothing I've found anywhere has helped.