Can wigs be made by hand?
You totally can make your own wigs

Are cosplay wigs generally handmade, or bought and then customized?

Yes and Yes or a combination of both.
When you need to get a certain style of wig for a character it can be hard to find that perfect wig online or at a costume shop either due to availability or budget. So making your own could be a useful skill you have in your back pocket when cosplaying or costuming.

but is this something we can expect to do ourselves?

Like many crafts it is something that requires patience and skill. You can't expect to make a magical, handsome, mysterious, captivating, bagelrific etc. wig your first try.
The following is a really brief tutorial of what you can do for a basic wig.
You need hair off course (synthetic or otherwise). The hair will typically be assembled into wefts for the portion of the wig. Wefts are assembled &quot;rows&quot; of hair. The units can be sewn or glued together usually to some other material like. You might also know these as hair extensions (which coincidentally make good raw materials for custom wigs). You could make these yourself from existing wigs or &quot;raw&quot; hair or purchase them outright.

Image from beautybychristinelieu.com
Depending on the overall design you might need to make other constructs, like a ball base for a pony tail or buns or something, but wefts would be a simple start. You could easily ask several questions about making wefts alone. I will move on assuming that your hair has been treated and /or processed so that it is now straightened (if you made your own wefts from fibre stock).
These wefts, and other parts, will typically be assembled on a cap e.g what you will actually be wearing on your head. Caps can be commercial products specifically designed for wigs or just material that can be used for a cap base like jersey etc. The caps are important as they need to be comfortable and allow your head to breath. That and something you can sew into.
Having a head model, preferably fake, is almost a necessity for assembly and getting a good idea of what the finished product will look like. Bear in mind, model heads are likely not the same shape and size as your own and that adjustments will need to be made to compensate for the size difference.
You then just need to sew the wefts to the cap. Examples of in progress wigs:

Image from cherishedcrowns.blogspot.ca

Image from casualtycosplay.blogspot.ca
As you progress you will likely need to use a combination of at least water and or heat to help form the wig into shape while also preventing damage to the hair while you work. One of the tips I read is that when sewing don't sew into the weft but into the hair as to not damage the weft.
Again this was a really simplified overview of a wig making process. Depending on you wig needs things can get pretty crazy but you will still be doing much of the above as your base in most cases. I hope this gives you a little incentive to consider wig making in the future.
Continued reading
A non extensive list of resources I saw while researching wig making.

A really good primer on making your own wigs with ties into other custom wig tutorials: Wig making from scratch
Wefting: Getting Started
Beginners wig making on YouTube by BeautyCutright