This answer should not be taken as the only correct one and excludes other options.
However, it is believed that many of a dog's actions and behavior patterns can be interpreted to varying degrees correctly.
For example, if a dog puts its head between its owner's legs or hides it, it is clearly trying to attract attention. But this is in a broad sense.
1. One of the options is that your pet is scared by something and needs support or protection.
It could be a sharp sound, a thunderstorm, noise in a neighboring apartment, etc.
2. If the dog gets bored and wants the owner’s attention, it can use this method to ask to play, to be given a treat, or simply to be scratched behind the ear.
3. A dog that wants to support its owner if he suddenly becomes sad may behave in a similar way.
Everyone knows that these animals sense a person’s mood better than others.
Perhaps she just wants to be close to her owner. But the accuracy of this gesture's interpretation depends on the level of interaction between the dog and the person, trust and understanding.
Don't forget about the characters of different dog breeds, conditions of keeping and other features. In such situations, it is also important to observe the pet.
For reference
A dog is a domestic animal, one of the most popular (along with a cat) companion animals.