Check this out. A comprehensive example on how to engineer a proper PID controller formula.
Design a PID formula to fit your robot
https://youtu.be/f_pGgHfo_hs?si=GW2yE_IdnTiTV3-M