Hriday Barot has written up a couple of example scripts for the Raspberry Pi Pico that will mimic mouse and keyboard input to the USB port it is plugged into. The scripts, written in CircuitPython, are very simple, but you can see how they work easily enough.
This seems ideal for something like a Stream Deck, which can control something like OBS when doing video broadcasting. Alternatively, you can do what Novaspirit Tech did and plug the Pico into your mobile phone to automate an Android game. Very clever stuff. You can read how he did it by visiting his blog.