Hi, this post is for beginners, so I'm gonna talk about how you should develop your defense (I'm just writing advice).
Castling is the best thing to keep your king safe, and if you safely transport your king to a corner with a piece like a rook, you should be safe.