for line in $(cat /etc/passwd)
That's not iterating over lines in the file, but over words in the file, where a word is separated by a space or tab or newline. When the line contains two words, then $line becomes something else, then echo $line | cut -d":" -f3 may not be a number. For example on this line:
name:password:UID:GID:A comment:directory:shell
Then $line will be equal to name:password:UID:GID:A on first loop iteration, than to comment:directory:shell on second loop iteration. On the second time, your script give an error - shell is not a number.
Check your script will shellcheck. Quote variable expansions. Use while IFS= read- r to read a file line by line, or in this case while IFS=: read -r to read field by field. Consider reading a tutorial on how to do basic shell scripting, like reading a file line by line. You may read about https://mywiki.wooledge.org/BashFAQ/001 . And, consider writing it in awk, it will be just awk -F: '$3>=1000{print $1}'.