Well, you didn’t. Don’t worry.
But if you found this page, there is a good chance you opened a link from a USB drive that you found somewhere. Without knowing what you opened, or what it would do to you.
Maybe you made sure to use an old PC where getting hacked wouldn’t be much of a problem, but chances are you are on your personal computer that you use for social media, emails, personal documents and banking. Or maybe a company computer from your work, where you have access to sensitive information or systems that are not supposed to be public. If the USB you plugged in was a Rubber Ducky or Bash Bunny, all of the information on the computer you are on and all the systems you have acces to, would now be compromised.
A good rule of thumb(drive) is to treat USB sticks (and SD cards and such) like you would a toothbrush. If you are not 100 % sure where it came from, whos it is and what is on it, don’t use it!