This may be a question best poised to a copyright lawyer who can give you actual legal advice specific to your country. In most cases, if you want to legally sell things you need to licence the property.
That said, I can give you a basic rundown of my understanding of copyright and how it pertains to cosplay. Though I wouldn’t recommend relying on this alone, as I am not a lawyer and I don’t sell cosplay outfits or props.
Making things for yourself: generally okay.
If you make it for yourself there isn’t an exchange of money and you are usually okay. As far as I know, cosplayers have not received cease-and-desist letters for wearing costumes to conventions and similar events.
Making things for sale: it IS infringement (that might not be pursued)
There are lots of prop makers making one-offs or small sets of props for sale, and there are costumers who sell cosplay commissions. This is copyright infringement but many companies don’t pursue it. This is (considered to be) because the items aren’t being massed produced, they are usually of items not for sale by the company,there isn’t a large amount of profit being made, the sales aren’t getting a lot of attention and it would be bad publicity to heavily crack down on the fan community.
That said, some companies are more aggressive in protecting their copyrights and step in when they find fan works for sale for a profit. This is usually in the form of a cease-and-desist. If you receive a C&D then you should immediately stop production and sales of that product. One such aggressive company is Disney (and as an extension: LucasFilm and Marvel), so much so that some conventions don’t allow Disney/Star Wars/Marvel fan art to be sold in the artist alley.
If the item you are recreating has an official/licensed version available then you are more likely be sent a C&D. This is because your product may hurt the sales of the official product and both the original copyright holder and the merchandise company that holds the licence will want to protect the property.
Mass producing things for sale: not okay.
Once you’re mass producing it becomes a big issue and the company is very likely to step in. This is also usually in the form of a cease-and-desist.
(If anyone has some resources to provide on this subject, please feel free to add them)