FWIW, Firefox is slower for me on certain pages. I keep Chrome installed for things like Google Docs. For example, in the word processor, it tries to save the document every few keystrokes and Firefox will hang for 5-10 seconds whereas on Chrome it's so fast it isn't noticeable.
Firefox developers welcome Bugzilla bug reports for slow site performance. Attaching a performance profile from the Firefox Profiler will make the bug more likely to get traction. Instructions for installing the the Firefox Profiler:
Google Docs performance is a long-standing issue, but it sounds like you're seeing an unusual problem. (I usually have 10-20 Google Docs tabs open all day in Firefox Nightly.) Perhaps try reproducing with any Firefox extensions disabled. Some, particularly ad blockers, can cause performance problems as they repeatedly scan the page's DOM.
Google Docs can be a little sluggish for me in Firefox, but it doesn't hang for 5-10 seconds every few keystrokes like you describe. It sounds like something unusual is happening.
Well we know that Google would put elements on YouTube to prevent Edge from using hardware acceleration.
So there might be a factor there.
But perhaps it could be an add-on.
I discovered that Lastpass injection feature to autofilled had a performance impact.
Switched to Bitwarden and it was noticibly faster.
At this point I use Chrome only for Google Meet. It works in FF ok, but I've had audio problems and general performance issues that just don't show up in Chrome.