First apply water-based products then anhydrous products, then oils, then emulsions then suspensions. For the full list of products and what category they fall under, refer to this:
https://www.deciemchatroom.com/how-to-layer-the-ordinary/.