As I noted in a comment, you have your Awk script enclosed in single quotes; your shell variables will not be expanded inside the single quotes. On the whole, that's good; $NF is not one of your shell variables.
You'll probably need to use a variation on the theme of:
awk -v user="${user[$i]}" '$1 == user { print $NF }' process.txt > "CMD$i.txt"
where you refer to user as an Awk variable set from "${user[$i]}" on the command line.
There are a few other oddities in the script. The < is not necessary with cat. You could avoid the Bash array by using:
i=0
for user in $(cat usernameSorted.txt)
do
awk -v user="$user" '$1 == user { print $NF }' process.txt > "CMD$i.txt"
((i++))
done
You do not want the back-ticks around the Awk command. Fortunately, you redirect the standard output to a file so the string executed is empty, and nothing happens.
${user[$i]}into the AWK command, right? Please edit to clarify. For debugging help, it really helps to include a minimal reproducible example with example input, desired output, and actual output (like errors).awkscript enclosed in single quotes; your shell variables will not be expanded inside the single quotes. You'll probably need to use a variation on the theme ofawk -v user="${user[$i]}" '…program…' process.txt > "CMD$i.txt"where you'll refer touseras an Awk variable set from"${user[$i]}"on the command line.