Yeah, it's something like...
Can I win material by force?
If the answer is no then...
Is my opponent threatening to win material by force?
If the answer is no then...
Simply develop a piece or otherwise make a simple improvement (like castling).
Then ask does my intended move allow my opponent to win material by force?
If the answer is no, then play the move.
---
If you can consistently follow this then you'll be far beyond beginner level... it takes most people at least a year of playing before this is so habitual that they don't have to consciously think about it.
And some people fail to make this a habit even after many years of playing.
Yep.
If I were to give one piece of advice -- which, when you get better, you'll find isn't absolutely, positively true, but for now you should assume it is -- it would be that you should develop every single piece and get your king castled before you launch an attack.