You should not be doing mv or cp inside awk. The following works:
for i in * ; do
[ -f "$i" ] || continue
dir_name="$(echo $i | awk -F'_' '{print $1}')"
mkdir -p -- "$dir_name"
cp -- "$i" "$dir_name"
done
However, instead of awk, you could use the % operator in bash to remove everything after the first underscore to get the directory name.
for i in * ; do
[ -f "$i" ] || continue
dir_name="${i%%_*}"
mkdir -p -- "$dir_name"
cp -- "$i" "$dir_name"
done
(use mv instead of cp if you want to move)