What is the meaning of [Let not your wits go wool-gathering]

Don’t allow your mind to wander. Think what you are doing. Literally, to go
wool-gathering is to go hither and thither collecting fragments of wool torn
from sheep by bushes and the like.