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 parameterparameter¹. The awk code then ignores that variable and prints the second field of each line in its stdin, ie. xyz for the one and only line. Note that were you to print ttl you'd find it empty.
Basically, the first $2 is a shell variableparameter expansion, evaluatedperformed by the shell, and the second is an awk field (the $ operator applied to the number 2, you could also have written it $ 2 or $ (1 + 1)...), 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 parameterparameter¹. 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"parameter"² so it's empty. However, when you run it as a script it may have a value.
#!/bin/sh -
echoprintf "This'This is \$2$2: $2"%s\n' "$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.
If you wanted for ttl to specify which field you want to output, you'd use:
$ echo "abc xyz" | awk -v ttl=2 '{print $ ttl}'
xyz
¹ though beware that with the -v var=value syntax, escape sequences such as \n, \v... in the value are expanded by awk, so if $2 contains \n, ttl will contain a newline character instead of \n
² unless you have run set one two three beforehand or possibly 2=two or argv=(one two three) in some shells which are ways to change the positional parameters dynamically in a shell.