Mounting a heatsink on a top of an SMD component not designed to be cooled from the top is pretty iffy. If you are lucky, then the plastic case is thin and there is some thermal coupling through the plastic. Maybe your main cooling route through the exposed pad on the bottom to the PCB planes is then almost enough, and the poorly coupled top heatsink adds just enough dissipation to matter. But usually these are just cargo cult used by Chinese "ebay/aliexpress module" manufacturers.
It's hard to design because manufacturer does not give any data about the thermal resistance from junction to top of the package, so this leaves testing (and having to somehow measure Tj). Better idea is to make sure your design cools enough through the normal route (exposed pad on the bottom), spread the heat over a large copper fill on the opposite side of the board, and use a thin thermal interface material to couple a bigger heatsink on the PCB, opposite to the chip.