I had a very similar issue, the touchpad in my Dell laptop would randomly stop working but I could still click. I couldn’t work out why until one of my keys stopped working. I replaced the keyboard and the touchpad issues disappeared. I suspect the cause was the faulty keyboard not sending the key up event as I had noticed pressing keys sometimes unfroze it. It could also have been a loose connection though.
If you’re using GNOME, you could try disabling the “disable touchpad on while typing” setting: gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false
Verify the keyboard is not disabled when pressing keys and see if the issue still happens. If that fixes it then it might be keyboard that’s the problem.
To enable “disable touchpad while typing”: gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing true
Firefox Profiles work like Chrome profiles, although the UX is a little cliunky without an addon like Profile Switcher.