Unity 2022 and VS 2022 go well together. It’s just that VS is generally ripe with the kind of issues where you have to reset things or delete some files/folders to restore it in a working state.
Try this: How to fix VS
And if that doesn’t help check for other posts by Kurt he’s got a loooong link list for possible VS fixes.