You do not say what exact Mac this is...
running Yosemite you will have to stair step your way up to at least El Capitan
https://www.apple.com/macos/catalina/
https://itunes.apple.com/us/app/macos-catalina/id1466841314?mt=12&l=en-us
macOS Catalina - Technical Specifications - Apple Support
https://support.apple.com/kb/SP803?locale=en_US
System requirements macOS 10.15 Catalina
macOS Catalina will run on all Macintosh computers that supported Mojave:
MacBook: Early 2015 or newer
MacBook Air: Mid 2012 or newer
MacBook Pro: Mid 2012 or newer
Mac Mini: Late 2012 or newer
iMac: Late 2012 or newer
iMac Pro
Mac Pro: Late 2013 or newer; Mid 2010 or Mid 2012 if upgraded with a recommended Metal-capable GPU
----------------------------------------
OS X 10.11 El Capitan - Technical Specifications:
https://support.apple.com/kb/SP728
How to upgrade to OS X El Capitan - Apple Support
https://support.apple.com/en-us/HT206886
download direct:
http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg
MacBook (Early 2015)
MacBook (Late 2008 Aluminum, or Early 2009 or newer)
MacBook Pro (Mid/Late 2007 or newer)
MacBook Air (Late 2008 or newer)
Mac mini (Early 2009 or newer)
iMac (Mid 2007 or newer)
Mac Pro (Early 2008 or newer)
Xserve (Early 2009)
back up drive typically at least the capacity of your internal harddrive.
3-2-1 Backup Strategy: three copies of your data, two different methods, and one offsite.
Boot clone https://discussions.apple.com/docs/DOC-10081
How to use Time Machine to back up or restore your Mac: https://support.apple.com/en-us/HT201250
Use DiskUtility Restore feature https://support.apple.com/guide/disk-utility/restore-a-disk-dskutl14062/mac
note: >System Preferences>Security & Privacy >Privacy>Full Disk Access
unlock the padlock, press the + button and add Disk Utility