It really depends on how common homosexuality is in your world and how rigid marriage is.
Homosexuality (including bisexuality) hovers somewhere around 4% for humans, so although modern society has largely accepted LGBT+ individuals, it's actually not terribly relevant at a big-picture level because the 96% are able to do enough of the reproduction for it to simply not matter. The only pressure to personally reproduce either comes from religion or pride in the family name (part of why having daughters was historically a bummer in many cases)- so your world will most likely apply this to royalty and nobles.
If homosexuality is more common, say 20-30%, adoption will be very much normalized by society, especially within nobility and royalty. If it's 50/50 gay/straight, straight couples would be socialized to be very accommodating to the non-reproducing population and might even border on being marginalized/exploited. Tip the scales further to where gay people make up 60-80% of society and straight couples might be socialized to consider it their societal duty to make babies for the others to raise. Bring it to 100% gay (or near to it) and you get a pretty interesting scenario where heterosexual sex would be purely for reproduction because nobody would actually enjoy it. Marriage would be necessarily loose.
Also keep in mind that the higher the incidence of gay kids, the more likely a pregnancy will result in multiple births, in order to compensate for the decreased chances of people passing on their genes. If only 1/5 adults are straight, you might expect quadruplets, quintuplets, and hextuplets a lot more commonly than single births, but this comes with its own set of problems. High rates of homosexuality are fairly unlikely from an evolutionary perspective as heterosexuality is greatly favored by natural selection due to its reproductive efficiency and societies develop at a much faster rate than evolution (assuming humanity is a representative model). This could only really be introduced over hundreds of years of gay acceptance and accommodating breeding strategies, but LGB folks would still almost certainly remain a minority.
If marriage is strictly monogamous and masturbation is forbidden, you're pretty much left with wizards and adoption. This shouldn't be a problem for royalty to reproduce via magic because 1. they can afford it; and 2. if the rarity of homosexuality is similar to humans in our world, this is something that will only come up every few hundred years- about 1 in 25 princes/princesses. For nobles (such as more localized Lords and Ladies), adoption might be somewhat more common if wizards are exceptionally expensive.
If marriage traditions in your world can accommodate it, surrogate fertilization/pregnancy will be a thing, whether it's via sexual intercourse or a primitive form of artificial insemination. In general, this is a bigger problem for gay men than lesbian women due to the lack of a womb, but some women would certainly be generous enough to be surrogate mothers.