I strongly suspect the computer was also not prepared per the directions in What to do before you sell, give away, or trade in your Mac. My recommendation is to return it and get your money back!!!!!!!!!! If the computer was not setup per the link's directions, what you have is a computer that will be permanently associated with the previous owner, not good at all. If you do not want to buy a new Mac then please buy an Apple refurbished Mac. You can find these at Apple.com, look on the bottom of the page for the Refurbished store. There is NOT downside to these machines, they are identical to new, have same warranty as new and are eligible for AppleCare AND can save hundreds of $$$.
If that does not work for you, then buy a used Mac from a reputable reseller such as Macsales.com. NEVER EVER buy a used Mac from:
- Ebay
- Facebook Marketplace
- Craigslist
- Nextdoor
- local PC shop
- an aquaintence.
Why, because most are not setup correctly for sale and you often are inheriting someone else's problems.
Sorry this has happened to you and hopefully you have very little time and money invested.