"put a top on," 1580s, perhaps mid-15c., from top (n.1). Earlier "cut the top off, shave the head" (c. 1300). The meaning "be higher or greater than" also is first recorded 1580s. Meaning "strike (a ball) towards its top" is from 1881. Related: Topped; topping. To top off "to finish" is colloquial from 1836; in sense "fill up, add more to to bring to fullness" it is from 1917.
<a href="https://www.etymonline.com/word/topper">Etymology of topper by etymonline</a>
Harper, D. (n.d.). Etymology of topper. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/topper