Rogue Sneak Attack with Dual-Wield [closed]

I am aware that this question is quite similar to another posed on this site, but I specifically need to understand whether you declare you are using the Sneak Attack on a given attack or whether it just happens on its own. As a related matter, let’s say my rogue is dual-wielding and chooses Sneak Attack on the first attack (main hand). If the main hand misses, has he “wasted” his one Sneak Attack attempt or does that then roll over to the off-hand attack? If the latter, is the implication that the Sneak Attack damage just “happens” whenever you get your first successful hit? Thanks all!