Do I have to pay VAT if I earn under 50,000 kr per year?

Under 50,000 kr annual turnover you do not have to pay VAT, but still need to have a CVR number and must not charge VAT.
You do not have to pay VAT if your annual turnover is under 50,000 kr. This is the so-called VAT threshold for small businesses in Denmark.
Even though you do not have to pay VAT, you still need to register your business with SKAT and get a CVR number. You must not charge VAT on your services when you are below the threshold, and you cannot deduct VAT on your purchases.
Note that the threshold applies to turnover, not profit. If you exceed 50,000 kr during the year, you must register for VAT from the moment you cross the threshold.