Yes, it is OK to put Xbox One on its side. The Xbox One is designed to be placed in any position, including on its side.
Yes, the Xbox One X can lay on its side. However, you should be careful not to place too much weight on it, as this could damage the console.
Yes, you can stand Xbox One vertically.
There are a few ways to do this. One way is to purchase an Xbox One vertical stand. Another way is to create a stand out of materials you have around the house.