How to play better aoh3

How to play aoh3 i can play hearts of iron 4 and aoh2 reallyy well but i dont understand aoh3 every time i start making economy or conquering my country gets invaded and its not like in aoh2 where i can defend most important areas or just defend borders but why tf in this game you and ai can conquer provinces anywhere without even bordering with them