Let's look at your first example:
echo "abc xyz" | /usr/bin/awk -v ttl="$2" '{print $2}'
This sets the awk variable to the second shell script parameter. The awk code then ignores that variable and prints the second field of its stdin, ie. xyz. Note that were you to print ttl you'd find it empty.
Basically, the first $2 is a shell variable, evaluated by the shell, and the second is an awk field, evaluated for each line of stdin by awk.
Now let's consider the second example:
echo "abc xyz" | /usr/bin/awk -v ttl="$2" '{print ttl}'
This sets the awk variable to the second shell script parameter. The awk code then prints that variable, which is empty, for each line of stdin.
In the shell context, $2 is the second parameter to a shell script. When you run this directly from the command line there is no "second parameter" so it's empty. However, when you run it as a script it may have a value.
#!/bin/sh
echo "This is \$2: $2"
Save that in the file demo, make it executable chmod a+x demo. Now run it and observe:
./demo one
./demo one two
./demo one two three
Unfortunately you haven't told us what you're trying to achieve, so I can't suggest a solution for your requirement. But hopefully you'll get there with the information in these answers.