Deactivate a User in Salesforce, the Admin can manage all the Salesforce users and the access they have to your Salesforce org. This includes the process of deactivating a user from Salesforce so they no longer have access. Typically this happens when someone exits the company or no longer needs a license. On the surface, this may sound easy to do but when you don’t perform best practices to deactivate a Salesforce user then the consequences can affect your Salesforce org.
While Deleting a user in Salesforce is not possible, it is possible to deactivate a user. Salesforce does not allow an outright deletion of users. Deleting a user can result in orphaned records and the loss of critical business information. Deactivating a user prevents access but preserves all historical activity and records.
Keep in mind that after deactivation:
You’re prevented from activating a user if the user is the:
If one of these scenarios is preventing you from deactivating a user you can freeze the user, this will prevent the user from logging in and you can update any processes and ownerships that are causing conflicts.
The main difference between freezing a user and deactivating them is that Freezing only prevents a user from logging in. Deactivating a user also prevents a user from logging in but frees up the Salesforce license the user was using that can then be given to another user.
For more blogs: How to Display Toast Notification in Salesforce (LWC)
Reference from: click here