We can style a toast to provide information, an error, a success, or a warning. It can remain visible for three seconds, until the user clicks to dismiss it, or a combination of both.
A component can send a toast notification that pops up to alert users of success, error, or warning.
To display a toast notification in Lightning Experience or Experience Builder sites, import ShowToastEvent from the lightning/platformShowToastEvent module.
For more blogs: How to Setup Entitlement and Milestone in Salesforce
Reference from: click here