What you also have to take into account is the bearing capacity of the entire construction. With a wood bed frame queen is no problem (you can easily put a few hundred kilos on it), but if you want to make a more elegant design, aesthetics and functionality sometimes conflict. Here too it is important to consult someone who has more experience with making furniture, for example at a public workplace.
What can also help is just to look at many examples. On this page I have placed some pictures of my double bed. Although it is a very high bed (easy for getting up), with legs on the inside, it still works very well! Another way of joining is through joining fittings: with a bowl hinge cutter you then make a hole in the wood where the batter can go.
The other piece of wood then has some pins, which can then be pulled more tightly through the fitting. The public workshop knows a bit more about this, or you can consult your favorite search engine about this. These were not all types of wood connections, there are many more, it really is a profession in itself. At a public workplace they can also often help you with which choices to make and where to buy the connection materials!