AWK is a good option if you have to deal with trailing whitespace because it’ll take care of it for you:
echo " word1 word2 " | awk '{print $1;}' # Prints "word1"
cut won’t take care of this though:
echo " word1 word2 " | cut -f 1 -d " " # Prints nothing/whitespace
‘cut’ here prints nothing/whitespace, because the first thing before a space was another space.