If you're buying the game from a store, it has probably been sitting on shelves in warehouses and such for at least a little while. The chances of it not being the latest version are pretty high there.
Digital download versions will probably just download everything at once, but don't quote me on that. (It will have to download everything either way!

)
Your switch should tell you if there is an update available the moment you launch the game, but if it doesn't (and your game is not on version 1.4.1) you can do it manually by pressing + on the game on the home menu, then going to "Software Update" and selecting "Via the Internet". Normally it just works automatically though. ^^