Thank you for reaching out to us and Welcome to the Wefugees community!
What status does your girlfriend have in Germany? If she has been granted asylum or refugee protection, she also received a ("blue") passport, that enables her to travel in many countries over the world - the UK included - and get married with it.
Since both of you have refugee status/ legal right to stay in each country which entitles you to residence permits, you should be able to get married and then live together in the UK (please check travel restrictions, all required documents to get your marriage approved by the UK government, the visa you need to apply for, etc.).
The marriage process of course depends on which country you would like to get married in.
Here is some information on Marriages in the UK: https://www.gov.uk/marriages-civil-partnerships/foreign-national
And How to Marry in Germany from the Wefugees Blog: https://wefugees.wordpress.com/2018/04/20/heiraten-in-deutschland-how-to-marry/
Once you two have been married, here are the requirements you need to fulfill in order to apply for a family visa, explained by the UK government: https://www.gov.uk/uk-family-visa/partner-spouse
Note: Apparently, in the UK, you can apply for a family visa as a fiancé if you plan to marry within 6 months after arriving in the UK (after the marriage, you have to apply for an extended stay). You can read about it in the source I linked.
Regarding your second question: I'm unsure how the marriage would affect the refugee status of your girlfriend, but have a look at the answer on this thread: Does refugee status change if I marry my fiancé?
I hope this was helpful. Please let us know if you have any more questions.
Kind regards and Good Luck,