You can, but you needn't.
There are several good solutions for this.
But before you go down that route, I'd like to give you an alternative.
I don't consider what you're suggesting as "ideal" for most people.
Become a Patron of Ask Leo! and go ad-free!
Clone a drive for backup
Most popular backup programs support cloning a drive: making an identical copy of the drive that can be physically swapped in to replace the original on failure. However, image backups contain the same information, can be created by many of the same programs, and can be used to recover from a much wider range of problems.
Clone?
What you've described is called a clone: a bit-for-bit identical copy of one drive made onto another drive. If the primary drive fails, you simply physically swap in the clone, and you're back up and running again. This differs from an image backup, which is a file containing all the information backed up from a hard disk in a format that needs to go through a restore process in order to be used.
While there's a little flexibility, cloning implies that the second drive be roughly the same kind as the original. The ideal scenario would be two physically identical drives.
Many backup programs -- including both of my recommendations, Macrium Reflect and EaseUS Todo, support cloning. In addition, CloneZilla is a popular tool.
Clone limitations
The biggest issue I have with cloning is that it's inconvenient, a waste of a drive, and while it's a fine response to hardware failure, it's not flexible enough for software issues.
If you clone a drive, you have one and only one backup. You presumably overwrite it every night. That means that if, for example, you get malware, then the malware will be replicated to the clone. If you delete a file, then that file will be deleted from the clone you generate that night.
A clone generally requires a dedicated backup drive; there's no practical way to use that drive for anything else. The backup drive generally needs to be an internal drive, as well; you don't want to have to crack open an external drive in order to be able to swap it in for your primary, damaged one.
The news isn't all bad. A clone can make a lot of sense if speed of replacement is very important to you. A clone can be up and running as quickly as you can open your machine and swap a few cables. Most folks, however, don't need this. There's an easier way.
My recommended alternative: the image
An image contains everything a clone does but is generally stored as a single file.
An image file is typically smaller than a true clone. Rather than taking up an entire replacement drive, an image file uses only the space needed to store the data being backed up. In addition, image backups are often compressed to save even more space. As an example, a full image backup of my primary 1TB hard drive, which contains 442GB of data, is currently 309GB. The drive on which I place that backup is large enough to hold several backups.
Image backups also support what are referred to as "incremental" backups. Rather than taking a complete image of the entire hard drive every night, only those files changed since the previous day are backed up. The most recent incremental backup of my drive is only 8GB. This allows you to keep snapshots of your hard drive for as far back as you have disk space. This can be exceptionally useful if you don't realize a file is missing for some days or malware doesn't make its presence known immediately.
Image backups are commonly stored on external drives. When the time comes to use the image, you either reboot your system from an "emergency" disk created by the backup program to restore the entire image, or "mount" (open) the image to extract individual files from it.
Overall, I find image backups to be significantly more flexible and powerful than a physical clone.
Do this
I applaud you for backing up, no matter how you do it! Seriously, it puts you ahead of the vast majority of home users.
I'd encourage you to consider using image backups instead of clones, though. A good external drive and backup program are all you need. I have several articles throughout the site that discuss how to do it, including a good overview in How to Back Up Windows 10 (& 11). I also have a course on backing up using Macrium Reflect that goes into much more detail.
In the meantime, subscribe to Confident Computing! More tips on backing up, less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I use Macrium Reflect (the free version). I create a full system image (on Monday) of each week and a differential image on every other day of the week. I call this my weekly backup set (One full system image and six differential images). I keep four backup sets (four full images and twenty-four differential images) so I can recover any lost file/file version, provided it existed within the past four weeks (28 days). When I created the first full system image, I copied it to my Google Drive storage space so I can access it if anything bad ever happens to my PC that makes the partition where I store my backups unusable (ransomware, etc.). Each month, I also copy the most recent full image to Google Drive, replacing the previous month’s image for the same reason.
This regimen has worked well for me over the past few years, and if I ever find that I need to be able to recover older files/versions of files, I can always re-configure Macrium to keep more backup sets. The only limitation is available storage space (I currently use a 2TB drive).
This is what has worked well for me and I hope it helps others,
Ernie
I am going to buy a new computer and will transfer all of the files and programs from the older computer to the new computer. Perhaps the “Macrium Reflect” program will help with this and I am going to add it to my apps, but I am asking for your opinion or if there is a better way to make the transfer. New reader and so far quite happy with what I see!
Bill Bailey
I keep 2 drives with only my operating system on them. When I change the drive or do a security scan on my primary drive I use Macrium Reflect to copy the drive. For my other drives I also maintain two identical drives. When I make a change to the primary drive I use “Beyond Compare” to compare the two drives and either add or delete files on my secondary drive. Has worked well for me.