Is it about the person's age or the extent of my knowledge of the person?
To add to TRomano's great answer, "thanks" isn't as much stranger-friendly as "thank you". "thanks" is mostly used with family and friends.
When you say “thanks” to someone, it’s like a quick verbal pat on the back. The word itself doesn’t take much effort to say and it just rolls off your tongue. If you drop a pencil and someone picks it up for you, you’d say “thanks.” You basically would say thanks to just about anybody.
“Thank you” on the other hand is a verbal hug. It takes more effort to say and people often add some tonal emphasis on either the first or second word. Plus it’s more personal since it actually includes the word “you.” Rarely do people say “Thank you”, and not mean it. It’s often a genuine expression of appreciation and possibly affection.