Hello BMat10, I'm Quinn, and I'm happy to help you.
Based on your system specifications, your computer should be more than capable of running Hogwarts Legacy without any issues. I also play Hogwarts Legacy, and this has been an issue for some time. What worked for me was disabling Hardware Accelerated GPU Scheduling in my Windows settings. The game is now running smoothly with all settings maximized, though I can no longer use DLSS Frame Generation. The performance is still good, and toggling the setting requires a system restart. Note, that this change might impact other games, Please try disabling Hardware Accelerated GPU Scheduling and see if it works for you. Feel free to reply if you need further assistance.