D. Deactivate the user record.
To prevent a former employee from logging in to the company's Salesforce organization and free up a user license, you should deactivate the user record. This action disables the user's access while retaining their record for historical purposes. It's a common practice to deactivate user records when employees leave the company or no longer require access to Salesforce.