If VS Code’s terminal won’t open because PowerShell can’t access its config in OneDrive, try renaming the config folder from CMD (not PowerShell):
ren "%UserProfile%\OneDrive\Documents\PowerShell" "PowerShell_backup"
Then reopen VS Code — PowerShell will auto-create a fresh config folder in Documents.