how to switch avast off

how do I temporarily switch off avast so I can run Windows system restore?

The real question is why do you want to use Windows system restore ?
What is the problem?
If you provide details we likely can help you solve it.

You shouldn’t need to do that - you should however disable the avast self-defence module.

AvastUI > Settings > Troubleshooting, see image, click to expand.