A bit more detailed answer:
Canon law refers to the treatment and handling of relics:
#1. It is absolutely forbidden to sell sacred relics.
#2. Relics of great significance and other relics honored with great reverence by the people cannot be alienated validly in any manner or transferred permanently without the permission of the Apostolic See.
#3. The prescript of #2 is valid also for images which are honored in some church with great reverence by the people.
The Different Classes of Relics
The word relic is derived from the Latin word relinquo – meaning I leave, or I abandon. The Church recognizes relics as being one of three different classes; First Class, Second Class, and Third Class.
First Class Relics
First class relics are the earthly mortal remains of saints, and are classified as being sacred relics. These remains could be any part of the body, be it bone, flesh (either skin or organs), and even hair.
As remains are considered to be precious and sacred relics, the Church has prohibited the sale of any first class relics. Custodians of first class relics are usually members of Faith Communities, or historical organizations such as Museums, rarely if ever, are first class relics entrusted to individuals.
Second Class Relics
A second class relic differs from the first class, in that they are the possessions or tools that were owned or used by a saint during their lifetime. Items such as articles of clothing, vestments, jewelry, scepters, bibles, and hand tools, could all be considered to be second class relics, so long as they were used by a saint.
In the case of a martyr, the instruments of their demise may also be considered a second class relic. The tools used in the process of torturing or executing the saint, though morbid to some, can be just as powerful as a ring worn by a saint. This can extend to the wood used to make the cross to which they may have been crucified on, the rope they may have been hung with, or even the ashes from when they were burned at the stack, such as Joan of Arc.
Much like first class relics, second class relics are prohibited from sale by the Church. They are also considered to be sacred relics as well, and are rarely found in the possession of an individual.
Third Class Relics
Third class relics are the only form of relic that the Church permits for sale. A third class relic is any item, new or old, that has made contact with the remains of a saint, or pressed against their tomb or reliquary; in other words a first class relic. This could include burial cloths that were used during their funeral process, the soil from which they were buried in, the remains of their casket, or newer items such as cloths, pendants, or mantillas, that have been blessed by God when placed against the first class relic.
Third class relics are worn, carried, or kept in the home, for protection, divine guidance, and assistance from their patron saint.
The Purchasing, Selling, and Exchange of Relics
A relic may be handed over either temporarily or on a permanent basis in exchange for monetary compensation. This may sound contradictory to our earlier statement regarding the sale of sacred relics, but it is in fact the
reliquary that the money is being exchanged for.
As the material used to construct the reliquary holds real world monetary value, the cost of the reliquary needs to be taken into account when relics are being moved to new locations, or taken on tours. Most monetary exchanges are done as donations, not as purchases and never for profit.
As we have stated earlier on in this article, the sale of first and second class relics is prohibited by the Church. This does not make the sale of relics an illegal act, in fact, there are many auctions that occur around the globe that trade in antiquities and other such rare items including relics.
If the purchase of a relic will prevent its desecration or destruction, it can be permissible to purchase the relic, as long as the money being exchanged will not be used for ill intentions, either against the Church or against the general populous, such as financing acts of terrorism.
Third class relics are available for you to freely purchase and use.
Third class relics are perfectly fine to be sold. When, where and how they are sold comes down to a moral and ethical choices. If someone is trying to capitalize on events of misfortune such as natural disasters, famine, or following acts of violence; this is greatly frowned upon by the community at large. Should someone be driven by greed and not behave in a good Christian like manner, instead seeking to profit off of the misfortune of others; they will need to seek forgiveness from God for themselves or answer directly to him.
Excerpted from https://www.scripturecatholic.com/catholic-relics/
(note: not an endorsement by me of John Salza or of his positions)