I have an old Lenovo laptop that I want to back up the main and recovery partitions of the drive to put onto a new drive but I don't know how to do so.
After following
@Ralston18's recommendation to back up all important files (to an external drive) you could try Macrium Reflect's (30 day free trial) and "clone" your laptop's drive to a new drive in a USB caddy.
https://www.macrium.com/reflectfree
It's common practice to upgrade old laptops and give them a new lease of life, by swapping the old hard drive for a new faster SSD. Caution: If the old drive or files are badly damaged, cloning might not be possible.
This article describes how it might be possible to upgrade your old laptop with a new faster SSD.
https://darwinsdata.com/can-i-replace-my-2-5-inch-hdd-with-ssd/
You'd need something similar to this caddy as a temporary location for the new SATA SSD during cloning and as a permanent location for the old hard disk after removal from the laptop:
https://www.amazon.com/KingData-Enclosure-External-Tool-Free-Indicator/dp/B0C9YLKFT5
This 500GB SATA SSD with DRAM cache would make a good candidate for a Windows boot drive:
https://www.amazon.com/SAMSUNG-500GB-Internal-MZ-77E500B-AM/dp/B08QBMD6P4
Other 870 EVO capacities exist between 250GB and 4TB, but the large sizes get expensive. Cheaper SSDs exist, but they don't have DRAM cache so are less suitable for Windows.
If your budget is limited, you could buy a DRAM-less SSD and it would still work as a Windows drive, but it would be slightly slower and could wear out sooner. I boot a number of ancient PCs from DRAM-less SSDs. Not ideal but I save hundreds of dollars spread over many systems. 20 drives with DRAM would cost me a fortune.
https://www.amazon.com/Patriot-P220-Internal-Solid-State/dp/B0BS9W92M1
If you need advice on the exact steps involved in cloning, other people on Tom's will provide detailed information.
Alternatively, if you don't want to upgrade your laptop, you can still use cloning software to create an "image" of the entire hard disk. You'll need a large external USB disk or memory stick for the image file. The image can be written back to a new drive at any time for an exact copy of the old drive (at the time of cloning) or interrogated to retrieve individual files.