Text functions work by position, counting characters from 1.
LEFT(A2, 3) returns the first 3 characters; RIGHT(A2, 3) the last 3.
MID(A2, 5, 4) returns 4 characters starting at character 5.
LEN(A2) counts the characters, spaces included.
FIND(" ", B2) returns the position of the first space (case-sensitive; SEARCH ignores case).
When the piece you want has a fixed size, the position is a number. When it does not, such as the first word of a description, FIND supplies the position: =LEFT(B2, FIND(" ", B2)-1) takes everything before the first space. The -1 drops the space itself.
These return text, even when the piece looks like a number: "2291" from a code is text. Wrap it in VALUE if you need to calculate with it.