I think your data would be safer from hackers if you use the library/school computer to just read blogs, and websites which don't require you to make a username and password to login to read articles, or watch online videos. But, it would not be a good idea to plug in a USB drive into a computer which is not your own since the computer maybe infected with a virus, and steals, and upload files from your USB drive to a server on the internet.
Sometimes, a computer operating systems like Windows may have wi-fi and networking security vulnerabilities which can make it possible for hackers to login to your computer, and view your files which are stored on your laptop's or smartphone's storage drive, and some ransomware and malware may even be able to install malware onto your laptop or smartphone by using a wi-fi connection which is not properly secured, or hacked by a hacker who made the connection insecure on purpose to steal data, or install malware onto victims' PC.
Sometimes, a computer operating systems like Windows may have wi-fi and networking security vulnerabilities which can make it possible for hackers to login to your computer, and view your files which are stored on your laptop's or smartphone's storage drive, and some ransomware and malware may even be able to install malware onto your laptop or smartphone by using a wi-fi connection which is not properly secured, or hacked by a hacker who made the connection insecure on purpose to steal data, or install malware onto victims' PC.