Ugrading to a new iMac? I have a 2017 21" iMac, I'm thinking of getting a new 2019 27" model in a few weeks, are all the programs that I have bought on the app store saved to my Apple ID? so if I go to the app store on the new machine, I just need to re-download them again (for free), or would the best way to do it, by making a backup using time machine and installing that from the ext HDD to the new Mac? doing it that way, would it fully install all the programs I already have (inc ones not from the app store)....and would it install all my saved passwords etc? I'm fairy new to Macs, so what would be the best/easiest way to do this? The instructions for time machine seem quite straight forward.
All the apps which you have previously purchased, and which are running on your present iMac, are available in the App Store for re-download. However, the best method for transferring your present user account(s) and apps to your new iMac is through Time Machine Migration Assistant, which will be one of the first options when you set up the new iMac out of the box. Make sure you have a current backup of your present machine and that the Time Machine device itself (External USB drive, etc) can be physically connected to the new iMac.

Just recently I upgraded to a 2019 iMac myself, and because I have loads of Thunderbolt drives, including my main Time Machine drive, I had to purchase Apple Thunderbolt > USBC adapters to do the migration and continue to use the drive as the Time Machine backup disk.