I FINALLY figured out what this thing is. Itโs a mushi pet, they were sold in Japan between around 2005-2007 and thereโs a ton of cool shells for it. All shaped like beetles. I combed through some old blogs and found some instruction manuals and much more high quality photos. And they play music!
a spherical vessel segmented into six compartments containing different spices and herbes (cinnamon, cloves, nutmeg, rosemary). Worn around the neck or waist, pomanders were thought to be a protection against infections and unpleasant smells.