I have updated the formulas to include the Trim and Substitute Functions.
The formula in C2 should eliminate multiple spaces between words and extra spaces before or after the text.
=unique(arrayformula(trim(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B2:B," "," ")," "," ")," "," ")))) or
=sort(unique(arrayformula(trim(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B2:B," "," ")," "," ")," "," ")))),1,true) for sorted results. This would be for names, etc.
The only thing that needs changing is the B2:B to point to the correct column.
A big thank-you to all who helped identify the issues and solving the issue.
Let me know if you find any issues or have additional questions.