It's not that hard. The king just can't move into check and it can't castle when it would be moving through check.
You have played 2 games here. By the time you have played 10 more games, figuring that out will be easy, as long as you aren't in time pressure.
I am new to chess,
Albeit, I have acquired enough knowledge about chess to play and outplay my opponent.
However many of my games end in a Draw/ Stalemate.
I understand that it is because my opponent's king has no more legal moves, but how am I supposed to keep track of what legal moves they have left? How do you even remember to keep track of where you can't move your own king, for that matter?