Does it matter if the product patent belongs to someone else and I produce it in China but I don’t sell it in China?

It matters! Patent rights are territorial and temporal. If the scope of use of the patentee's patent is domestic, for example, the useful life of a utility model patent is 10 years, within these 10 years you cannot produce and sell it in the country without the consent of the patentee. If one is violated, it is an infringement.