Whisk the kosher salt, paprika, onion powder, dried thyme, white pepper, cayenne, black pepper, and garlic powder together in a small bowl to make the spice rub.
Pat the whole chicken dry with paper towels. Rub the spice mixture all over the exterior of the chicken and under the skin where possible. Place the chicken on a tray, cover, and refrigerate overnight.
When ready to cook, stuff the chicken cavity with quartered lemon and/or onion if using.
Set the Instant Pot to Sauté on high and add the olive oil. When hot, sear the chicken breast side down until browned, about 4–5 minutes, then carefully turn and brown the other side 3–4 minutes. Use tongs to help maneuver the bird. Remove the chicken to a platter.
Place the trivet into the Instant Pot and add 1/2 to 1 cup chicken broth or water to the pot. Put the chicken on the trivet breast side up.
Secure the lid, set the valve to SEAL, select High Pressure, and set the timer for 24 minutes for a 4-pound chicken.
When the cook time ends, allow a natural pressure release for 15 minutes, then carefully quick-release any remaining pressure and remove the lid.
Transfer the chicken to a platter, tent with foil, and let rest about 10 minutes before carving and serving.