I have no doubt there is a better way but this seems to match your example:
Where-Object { $_ -match '^(?!.*user).*error.*' }
it will pass only the lines which do not match the word user anywhere but match the word error
user
error
https://regex101.com/r/9kFxBt/1