You need to have a USB stick with at least 8GB of space and you have to be ready to erase all of its contents.
Use an Ubuntu system such as a laptop you obtained from the library. Go to ubuntu.com, and you should have no difficulty finding out how to download the image for USB stick and instructions on how to make a USB stick with that image.
This is what the instructions will tell you to do: 1) Click on
Download; 2) Choose
Ubuntu Desktop 22.04; 3) The download will start immediately. If it doesn't, then they will tell you what to do; 4) Wait for the download to finish.
Make sure you do not accidentally create 22.10 or 23.xx (when becomes available) as these are not LTS distributions. Ubuntu 22.04 is the one that must be used even if it is not the newest one. Follow the steps described at
Make sure that when unplugging the newly created USB drive you use the proper procedure explained in
In the case you insist on using a Mac or a Windows PC, you are on your own. There are guides on https://www.ubuntu.com. The versions of Mac and Windows are numerous and creation of a bootable drive slightly differs from one version to another.