This is very, very, very bad advice. A non-standard port is not a defence. It’s not even slightly a defence.
Its security through obscurity, which puts you out of view of the vast majority of the chaos of the internet. It by no means protects you from all threats.