From Friends S02E14
INTERVIEWER: Alright, lets see if you’re as good in person as you are on paper. Make me a salad.
MONICA: A salad? Really I, I could do something a little more complicated if you like.
INTERVIEWER: No, just a salad will be fine.
MONICA: You got it.
The interviewer asked Monica to make a salad, and Monica said you got it, What’s the meaning of it? Shouldn’t it be I got it which means I understood your words?
In TV dramas and movies, you got it is often used to mean “I’ll do as you ask”. It’s also common while taking an order from the boss/commander.
It is the response of a subordinate to their superior.