In most dynasties, as long as you have money, you can buy and use it. The emperor also used sandalwood, "secret incense" and "immortal incense" made by Taoist priests (some foolish emperors).
Ambergris should not have existed before the Jin Dynasty because the navigation industry and international trade were underdeveloped. According to research, the ambergris recorded in ancient books before the Jin Dynasty should be a mixed spice of some kind of animal and plant powder. It was later used Used to describe the current ambergris