Dear @Yolo,
Welcome to the Wefugees Community and thank you for your question.
I assume that you are an asylum seeker in Germany? I am afraid you will face problems in two aspects, if you want to marry in Denmark at the moment. On the one hand, as long as your asylum application is pending, you can not just leave an re-enter the country. I don't know if there is any chance to get an exceptional permit for the marriage. You may want to ask the local immigration office about this. Additionally, as you can also read on this website, you must be able to enter Denmark legally. For a visa you need to consult the Danish Embassy in Germany. I assume both issues will not be easy to solve. However, as soon as you got a refugee recognition or the subsidiary protection, for example, you are also able to travel within the EU legally.
I hope this helps and all the best,
Meike