The question is whether this laptop has a firmware password lock or an Activation lock enabled. If either one is active, then there is absolutely nothing you can do to fix it.
If this laptop automatically logs into the macOS user account and you see the previous owner's AppleID, then you should just be able to create a bootable macOS 10.13 USB installer using the instructions in this Apple article:
Create a bootable installer - Apple Support
When you boot to the macOS 10.13 USB installer, you will need to launch Disk Utility so you can erase the whole physical SSD as GUID partition and MacOS Extended (Journaled). Name the volume "Macintosh HD" without the double quotes. Within Disk Utility you will need to click "View" and select "Show All Devices" before the physical SSD appears on the left pane of Disk Utility. Quit Disk Utility and select the "Install macOS High Sierra" option.
Once you have macOS 10.13 installed, then you should upgrade to macOS 12.x Monterey. You can find links to various macOS installers within the following Apple article:
How to download and install macOS - Apple Support
I did not have you install a later version of macOS since it may be necessary to first install macOS 10.13 since it introduced a lot of new changes including updated firmware.
FYI, you should always perform a clean install of the OS whenever you acquire a used device so that you know you have a factory fresh OS installed and all of the previous owner's stuff has been deleted & destroyed since you don't know what nasty surprises may have been lingering in the old OS. Plus a clean install will alert you to whether a used Mac has a firmware password lock enabled or whether the Mac is still being managed by a previous owner....neither of which you can do anything about, but best to know if this is the case.
If you are unable to log into the macOS user account, then you can still perform a clean install of macOS, but it will be more difficult unless you have access to another compatible Mac which you can use to create a bootable macOS USB installer. Generally a compatible Mac for a 2015 model will be a Mac from 2007 to 2018. If this is the case, then let us know as we can provide some options & instructions.
If you are unable to log into this Mac and you don't have access to another compatible Mac....and there is no firmware lock or activation lock, then you can try booting into Recovery Mode using Command + Option + R to try to perform a clean install of macOS 10.10 Yosemite. Using this method to access Recovery Mode should not require authenticating with an AppleID, however, I'm doubtful you will be able to reinstall macOS this way since there have been numerous reports on this forum for several months now that Apple may have disabled the online macOS installers.....that is when you select "Install macOS Yosemite" option in Recovery Mode you may encounter an error something like "unable to contact recovery server". More than likely you would need to change the system date to 2017 as well since the security certificates for the online installers have expired.
If you can boot into a macOS admin user account on this Mac, then make sure to create a bootable macOS 10.13 USB installer now while you still can before you try to erase this laptop since once you erase the laptop, you will lose this option unless you have access to another compatible Mac.