I know that most viruses that can infect the OS from having the infected usb inserted into the PC are mostly Windows only, but is there any possibility that there is one that can affect Ubuntu as well?
Sort of complex thing to answer. There are multiple vulnerabilities that can be exploited via USB connection. For example, CVE-2018-19824, from the linked search: in theory you could have a USB stick that masquerades itself as a sound device and exploits Alsa vulnerability.It also depends on what flags are set when USB is automounted. Most of Windows viruses rely on autorun feature, which is disabled on Ubuntu out of the box, but can be enabled How to autorun files and scripts in Ubuntu when inserting a USB stick like autorun.inf in Windows?
Does such malware exist for Ubuntu ? Probably. But it has to be crafted for specific target or just rely on luck that the user has certain vulnerabilities unpatched and/or autorun enabled.