If you wrap your two right items into a div, justify-content: space-between
will work as you are expecting:
.orders-table-header {
display: flex;
justify-content: space-between;
}
.orders-table-text {
border: 1px solid red;
}
.right {
display: flex;
}
<div layout="row" layout-align="space-between" class="orders-table-header">
<div>
<p class="orders-table-text text-center left">ORDER ID</p>
</div>
<div class="right">
<p class="orders-table-text text-center right">TOTAL</p>
<p class="orders-table-text text-center right">VIEW</p>
</div>
</div>