NHR concern

I’m a software dev with clients in US. I’m told I have to pay 20% flat tax (plus 21% on 70% income).

Question is if i dont send money to Portugal and keep the money in the bank in the US will i still pay tax, and if i dont declare the money how will Portugal know?

My idea was to move enough money before my residency that I can live off comfortably for the next 5 years.

PS I’m a 3rd country national but have a bank account in the US.