It seems like you are experiencing issues with error messages displaying after submission of your form. Keeping track of the form state with your current approach can be challenging, but there are some tricks you can utilize:
this.userForm.markAsPristine();
this.userForm.markAsUntouched();
Another suggestion would be to consider a different method:
Rather than showing errors only after submission, you could leverage reactive forms to display errors instantly for each field in your form. The submit button should only be enabled when the form is valid.
Note: If the error message originates from the backend, you may want to consider using a toast or snackbar notification.