Delete guest user in SharePoint Online
When a user or guest is in a SharePointsite, their user information is cached savedin the UserInfo list. When the user or guest is deleted, their related UserInfo information is not deleted. Their profile is still displayed, which may cause confusion when users search SharePoint.
So sometimes guest users remain active in SharePoint. Instructions for removal in this blog.
Deleting a guest via Azure Active Directory
Navigate to https://portal.azure.com
Delete the guest user
How do I delete a guest via Office 365 portal?
Remove via PowerShell
Connect-SPOService -Url https://yourtenantnamesharepoint.com -Credential $cred
$ExtUser = Get-SPOExternalUser -filter firstname.lastname@example.org
Remove-SPOExternalUser -UniqueIDs @($ExtUser.UniqueId)
More information can be found here: https://docs.microsoft.com/en-us/sharepoint/remove-users