if you take a friend who knows their stuff you should be ok…as a general rule you should look at the points below if buying used…
does it fit?
do the gears work properly?
how worn is the drivetrain and how soon is it likely to need replacing?
do the brakes work and how much pad life is left?
do the wheels spin smoothly?
are the wheels straight?
condition of tyres….might need to kick them!!
does headset and all other bearings (hubs, bottom bracket) run smoothly?
contact points (saddle, grips, pedals) in good nick?
seatpost not seized with smooth action?
do the forks work smoothly? condition of forks? do all the adjustments (rebound, compression, lockout etc) work as they should? if it needs air does it hold air and does it come with a pump?
is the frame straight?
are there any dents/scratches on any of the tubing. check for cracks and crash damage (around headtube mainly but also check all weld areas)
i’m not sure if i’ve missed anything off but if i have i’m sure the STW massive will point that out add to the list
if all the above is good then you need to haggle so long as you like the bike.