Sealants are designed for primary protection and secondary looks and are typically slated to last 4-6 months minimum. Waxes on the other hand are designed for more looks and lesser protection and (leaving the hybrids aside) last for 1-2 months. So, a product meant for protection needs to be applied closest to car's skin i.e. bare paint. And if you are going sealant over a wax, you are still almost looking at a durability of layer underneath it (wax in this case). Keep in mind waxes have a lot of oils and therefore dont let the sealant cure/bond properly to last longer.
There isn't really a right or wrong combo here. If you are somebody that loves detailing and trying out different things and do it frequently, durability isn't really a concern. But results/studies have shown that, Wax over a sealant is a durable combo compared to vice versa. Either way, products should be let to cure fully before layering. At times, products of the same brand are less forgiving if you layer them prior to full cure. Some (infact most of) the products also have solvents in them as well that will do some cleaning along with the layer it'll put so a lot of times you are removing the layer below by layering (specially if its not fully cured).
I hope this sheds some more insight to waxes/sealants combos and cure times.