The ammonite's shell was presumably picked up and preserved after the resin fell off a tree and tumbled across the seashore.
After the resin fell off the tree and moved across the shore, it is probable that the ammonite's shell was collected and preserved.