This is a very hardware and O/S specific thing, but worth noting.
My personal workstation currently has a AMD 5600G and NVIDIA GTX3050 to run Ubuntu 22.04 Desktop with Ubuntu's customized Gnome Shell. I use the NVIDIA driver packages from Ubuntu. My desktop environment is Ubuntu on Wayland.
This machine doesn't play games, but I do fair amount of data analysis tasks and experimentation.
After a recent driver update I noticed a lot of stutter and lagging in all my Gnome terminal sessions. Switch to xterm relieved the problem somewhat, but wasn't a real solution. Neither was trying to switch back to the integrated AMD graphics.
Over a couple of weeks I found and tried a few recommended solutions from the Internet (which is almost always wrong). None worked. Then I stumbled on this post:
Oeshen Playz1036. "input delay on Terminal Ubuntu 22.04.04". Ask Ubuntu, 30 March 2024, https://askubuntu.com/questions/1509058/input-delay-on-terminal-ubuntu-22-04-4.
The accepted answer from mikabytes on April 4 contained the solution:
sudo add-apt-repository ppa:vanvugt/mutter
sudo apt update
sudo apt upgrade
A follow-up from egmont explained the origin on the problem in a buggy update to mutter, which presumably will be fixed in a future release.