Not illegal.
Lawyer's analysis
It is not illegal to buy and sell domain names under normal circumstances.
Normal purchase is not illegal, and infringement is illegal.
Every domain name has a registered patent.
Anyone who uses another person's work shall conclude a licensing contract with the copyright owner. If you don't sign the contract, it will be regarded as infringing use, and in serious cases, you will be sentenced.
legal ground
Article 2 16 of the criminal law
The crime of counterfeiting patents, if the circumstances are serious, shall be sentenced to fixed-term imprisonment of not more than three years or criminal detention, and shall also or only be fined.