+1 on what
@the baron has said about clean glasses. If you can see tiny bubbles on the side of your glass when there is beer in it your glass is dirty. Rinse your glass after washing and use a dedicated clean glasses cloth to dry it, not something you have dried the dog with after it's walk.
But if you want a head on your beer and all else has failed and you have access to the sort of syringe that come with children's medicine like Calpol, just use it to inject air into the beer and a head will form. But be careful the injection of air can displace lots of dissolved CO2 which then creates a head that will escape the glass.
Alternatively pour your beer into a serving jug from a modest height and then into your glass. But make sure the jug is bigger than the glass.