Having had the 6 and now the X, it is 100% a random bug that is just absurd.
You can literally set and alarm and test over and over - with completely random results.
Try going to alarm and setting it for 1 min later. With volume completely up, it is loud maybe 50% of time on a good day. It is possible but would need to do more useless research on whether turning phone off and back on, gives you a loud alarm at least on the first attempt. But its a crapshoot after that.
Iphone model and ios version are irrelevant (have had this happen for last 5 yrs, and like a crazy person, I continue to test it thinking I will magically get another result.
Lastly, and perhaps most bizarre, ringer can be quiet, then after a snooze or two, blare at full volume. The fact such an important feature does not work consistently is just another reason to hate this company’s products.
Yet I remain a customer - so shame on me.