Basic opening theory is not so bad. None of it is absolute, keep that in mind!
Control the 4 center squares, get your pieces off the starting position, castle, and don't put your queen out somewhere that you are constantly being attacked and retreating it. Don't hang pieces, and pay attention to any offered trades as to how they mess up your position (or not): most offers early on are attempting to undermine your center, or your pawns generally, or swindle you out of a piece with some tactic.
for white the strongest, simplest opening is probably the queen gambit.
for black, responses to e4 require some study on your part as to how to approach it. e4/e5 is weak, so you need something else against stronger opponents, and the options are not so simple.
So I have been playing chess online recently and losing. Allot. Basically because I dont know what to do in the beginning of the game. Once some pieces are out I can think ahead, but in the beginning I have no clue what to do. I pretty much just try and protect the middle of the board (not well). I know there are openings I should learn and things but its challenging to follow them under the circumstances often. So what should my thought process be in the beginning? What are my goals? And what are some good openings for beginners?