The process went like this: get boat in New York Cit, sail to India, load up on opium, sail to China, sell opium to Chinese, don’t get killed in the process, use money from opium sales to buy ‘exotic Oriental goods”, sail to San Fransisco, sell “exotic Oriental goods”, take pile of money back to New York City, retire to newly purchased estate.
That’s a good summary.
Then they made many more millions during the Civil War by providing Opium to the Army Medical Corp.