The cause of the problem is that your browser don’t trust that certificate. To fix this error follow the following steps
Open settings in browser
Open settings in browser and search for certificate > view Certificates > Authorities > select your portswigger certificate
Choose to Edit Trust..
Select This certificate can identify websites option
Click ok and now the problem is solved. And you’ll be able to intercept traffic successfully.