Let’s say that you want to include a bottle of water and some trail mix in your backpack. To ensure that neither of these additions causes any harm to your laptop, you most definitely want to screw your water bottle lid on very tight and make sure your snack is in a secure container that cannot be opened. Often, you can get screw-on lid containers for snacks, too.
Furthermore, it is suggested that you place your water or snacks at the bottom of your bag, so if there is any spillage it doesn’t flow all the way through and cause more damage. The moisture will only be at the bottom of the bag and not all throughout.