My recommendation is to avoid buying used.
When I started here 20+ years ago when log-in security measures were somewhere between minimal and non-existent, buying used was not much of a risk. Today, with Apple IDs, two-factor authentication, and other security schemes, I see little good from buying used.
Online, you cannot inspect the device. One person bought a "factory refurbished" iMac online that, on arrival, had duct tape holding the screen cover in place. The only refurbs you know are true, warranted Apple refurbs are only sold web-direct by Apple, and not by other parties.
We see far too many posts here from people who bought used only to find the device was useless because the security measures had not been reset for resale. Used devices cast off by companies and schools are the worst. for not being properly prepared for resale.
Apple refurbs are not available in all countries and regions. In the US they are available here:
Certified Refurbished
If you are not in the US, go you your localized Apple home page and scroll to the bottom. It you see this:

genuine Apple refurbs are available to you.