what is sideways what is right side up.
Location of physical camera lens on the device is a hint..... consider physical camera lens to be the top of the camera device in your hand..... this is usually true but not always. Does not matter if it is Android/Apple..... Result is most Phone/devices are defaulted to portrait. Believe larger tablets are defaulted to landscape simply due to how/where camera is installed inside it.
Smartphone/tablets will tag a code on the image file (jpg, etc.) that tells other devices when the reading the file, which way is up..
Photo is NOT stored in memory/memory card with the correct side up.... it is stored according to how the device was oriented (sideways or not) but
with code added as mentioned.
Newer software (including photo edit software) and devices can read this code... irregardless on how it was stored in memory/hard drive.
....took the pic on an LG Android, sent it to my HP laptop via GMAIL where I opened Chrome to read GMAIL, saved it to the laptop on WINDOWS 10, the posted it to OTT from Chrome. ...
So your phone took a sideways pic and saved it with a code. All the other items you mentioned but OTT could read the code.... so they knew which way was up thus flipped pic to correct side up "before" it placed it on your computer screen; again regardless of how it is actually stored in your memory/hard drive. What you sent to OTT was from the hard drive.
Older devices, software etc..... see's the code as gobbldy gook and ignores it so your pic ends up being posted exactly how image was photographed...either camera laid on its side /or not. 90% of all smallish bulletin boards like this one can't read the code...... so you get sideways pics more times than not... does not matter if it came from an Android or IOS device.
sooo...... put your camera lens on your devise at the top when you take pics for use on a bulletin board...... or....... use photo edit software or website to flip the image file and save file (no code needed) with the correct side up. You have to look close in photo edit software..... it will clue you somewhere about which way you want to save it...... Sameway with websites.... for both do not assume what you see on the screen is what will get saved....... you have to tell it to save as you see it; don't assume.
here is an ok online pic editor you can use.
https://pinetools.com/flip-image