Making your closed terrarium airtight is import so the air humidity cannot escape. If you don't hermetically close your terrarium, water will escape slowly but surely and all your plants and animals will die. How you can make any container airtight will the explained here.
Why do closed terrariums need to be airtight?
Whether or not air can escape your closed terrarium isn't even the real problem here. But air always carries a littel water with it. Since it'll be a lot more humid inside your closed terrarium than in the rest of your room, most of the humidity would escape over time if your terrarium isn't airtight. Then your plants would dry up. How you can see if your plants have too little water is explained in this article. An qeuilibrium is reached when the humidity inside your closed terrarium is the same as outside of it. This way not enough water will be left inside the substrate. That's why it's important too make a closed terrarium airtight.
If you need ideas for beautiful glasses in the first place, why not read this article here.
If you have a screw cap
Possibility #1: Flange gasket
Affiliate note: I receive a small commission for some of the products linked in this article, if you buy them through my links. This won't cost you any more than usual! I recommend all of these products based on my honest opinion and not because of the commission I receive. As an Amazon Affiliate I earn through qualified sales. For more information, please read this affiliate note.
If you already have a screw cap on your container the easiest way will be to buy a gasket. There are multiple variants of gaskets and one of them is the flange gasket. It's usually used between to pipes that won't be opened up again. If your terrariums container has a flat top, lay the flange gasket ontop and screw it tight. Flange gaskets come with a disadvantage however. They need to be exactly the right size for your container. Maybe you're lucky and can find one that fits.
Possibility #2: O-ring
Another form of gaskets is the O-ring, which looks exactly how it sounds. You put one around the thread of your container and screw on the thread. Contrary to the flange gasket, size doesn't matter as much here, since you can stretch an O-ring to fit any container. This is probably the better option for your closed terrarium. If you screw your cap tightly, it's basically perfectly airtight.
If you don't have a screw cap
Possibility #1: Cling film
If you don't have a screw cap on your container but rather something like a cork, cling film can help you out. Use two or three layers and wrap your cork in it. Then put it into the bottle or jar as usual. You can cut the rest ontop with a small pair of scissors or a sharp knife. You'll probably not even notice the cling film if you aren't specifically looking for it.
Cling film can also hekp you if you don't have any cap at all. You can just use a rubber band to attach it. It's also helpful for caps with holes in them. But what kind of containers have caps with holes in them? It isn't as far-fetched as it might seem. I'm willing to bet you even have some at home right now. I'm of course talking about spice shakers! They can also be used to make cute little terrariums.
Possibility #2: Balloons
If the typical see-through look of cling film is a little too colorless for you and you'd rather show some color, you can pull a balloon over the opening. This works best for long bottlenecks but can be done with other kinds of containers as well. If your balloon is a little too big you can always cut it. It'll probably stay on your container by itself. If not, rubber bands can help here as well.
Possibility #4: Silicone caps
Another good alternative I can recommend are silicone lids. You can buy them in various sizes. They are usually used for tupper ware, glass bottles or beverage cans. Just like balloons they are strechable and will fit over many openings no matter the size. They are available quite cheaply. They're usually airtight by themselves. Just incase you can buy another O-ring.
Possibility #4: Modeling clay and super glue
For small openings you can also use modeling clay. That in itself is already quite airtight but isn't suitable for closed terrariums. The daily water cycle will clear away the modeling mass over a long time. This will produce dirt on the walls and after a while you'll have a hole ontop. You can cover the inside with a layer of super glue to make it completely safe against water though. I did that myself and am very happy with the result.
Now you don't want to open it again
And that's great! But at some point you'll notice that your plants and insects are making the walls dirty. How you can clean a closed terrarium (maybe even with out opening it) is explained in this article.
An airtight cap is one of the most important parts of your closed terrarium. Whether you're using a flange gasket, a silicone lid or modeling clay. It's only important that no humidity can escape so your plants and insects don't dry out.