PepsiCola
Thanks for showing the ping plotter results. Although there may be jitter problems causing your unstable ping in other hops on your route to the host, you should first try and address the variance in the ping that is shown on your first hop (your router or modem). This could be the main source of the problem or start to the pattern.
It seems your router or modem is capable of giving you 3 to 5ms ping times which isn't great but isn't unreasonable. It shouldn't, however, be giving you maximums of 25 to 30ms pings. By chance is your connection to your router over wifi? If it is wifi, you will want to do your best to wire in directly at the very least for a test.
The problem with wifi connections happens when other devices are also using the wifi connection, each transmitter has to listen before transmitting and if it detects another device using the wifi it delays for a random number of milliseconds before trying again to avoid interference. These random delays are not good at all for latency sensitive applications like gaming. If it is not wifi try a different cable and/or search the internet for jitter problems with that specific device model number.
As an example for you this computer I'm on right now has a wired connection through 2 local routers before getting a connection to the modem. The ping times to both routers are less than 1ms and don't show much variance.
bash-5.1# mtr -rw 139.162.235.20
Start: 2023-08-27T14:07:48-0400
HOST: bluebird.mylab.home Loss% Snt Last Avg Best Wrst StDev
1.|-- mylab 0.0% 10 0.2 0.3 0.2 0.4 0.1
2.|-- Ensixsix-ten 0.0% 10 0.6 0.5 0.5 0.6 0.1