May just need a tune-up.
check fuel pressure and compression in all cylinders.
Try cleaning throttle with a can of throttle body cleaner and check air filter. Also replace fuel filter if have not done so in a while.
Looking for a Used GMC in your area?
CarGurus has 24,448 nationwide GMC listings starting at $1,240.
Search GMC Questions