“Cho tôi” is a crazy phrase with a lot of meanings. To get this easier, I recommend you 2 meanings.
In your example 1 and 3, “cho tôi” is a short form of “cho phép tôi...”, which means “please let me do something” or “ Can I/ May I do something”. All Vietnamese know this, but it’s difficult for foreigners.
In your example 2, it is the most popular meaning of “cho tôi”, “to give me something”. In some situations, it also means “to give me something for free.”
My English is not good, so tell me if you have any misunderstanding. Thank you!