The way to fix that space allocation is to completely ERASE the boot drive, which creates a new partition structure, install MacOS anew from fundamental sources available (which may produce an older version by default) upgrade to the MacOS version you want to be running, then restore your files form your trusted backup.
if you have nothing invested in the files on this computer, This article describes the way you both SHOULD have proceeded:
What to do before you sell, give away, trade in, or recycle your Mac
https://support.apple.com/en-us/102773
An Intel MacBook Pro 13-in from 2017 does not have a T2 chip, therefore avoids the complications of its security restrictions. But it means you must perform the many steps under: "If you can't use erases all content and settings" in that article.