Backup entire mac hard drive to a usb drive and later restore
If I'm understanding you correctly you want to backup the MacBook before you use it, then restore it a few months later so that anything you do over the next few months is wiped out and you can return it to your friend in the same condition you received it.

If this was me, what I'd do is just create a new dust2098 account for myself in the "Users &amp; Groups" panel of System Preferences, and log into that account for the next few months and then before giving the MacBook back, log into your friend's account and delete that new dust2098 account I'd created for myself.

I'm assuming you are coming from a Windows background. Macs are quite different from Windows and don't accumulate quite as much cruft as they are being used. For example, where application store their settings in the Registry in Windows, they are stored in individual plist files within your own account on a Mac. Also where random applications will regularly try to install or make changes to the c:\Windows folder (less so in more recent versions of Windows), on a Mac the /System folder and other critical locations are locked down by the System Integrity Protection (SIP) feature.