The difference in these sentences is a difference between verb tenses. 'Have you got' is the present simple tense. In American English, it would be worded as 'Do you have'. The present simple tense is used to say something is always true or is true right now. 'They have a dog', 'It is a car', and 'I am an American' are all sentences in the present simple tense. If you wanted to turn those into questions, you would move the words around so that the verb is at the beginning of the sentence.
They have a dog. ---> Do they have a dog?
It is a car. ---> Is it a car?
I am an American. ---> Am I an American?
'Did you have' is the past simple tense. The past simple tense is used to say something happened and is now done. 'They had a dog', 'It was a car', and 'I was an American' are all sentences in the past simple tense. If you wanted to turn those into questions, you would move the words around in the same you moved the words for the present simple tense.
They had a dog. ---> Did they have a dog?
It was a car. ---> Was it a car?
I was an American. ---> Was I an American?
The words change in different ways if you are talking about yourself or someone else. The words also change in different ways if you are talking about one person or more than one person. This is called 'verb-tense agreement'. A full list of combinations would look like this:
I am a student. // I was a student.
You are a student. // You were a student.
He is a student. // He was a student.
We are students. // We were students.
You all are students. // You all were students.
They are students. // They were students.
If you are still having trouble, look at these charts: