The vanity goes in first normally. As floors are not generally
level, the vanity can be leveled with shims, then the tile will
butt up to the vanity and hide the gaps.
Unlike kitchen cabinets which cover large areas, bathroom
vanities are generally small, so setting the vanity over the
tile isn't necessarily bad either, assuming it can be set flat
on the tile.
In my experience as a long time tiler, it's more likely that the tile
will be replaced before the vanity, and it's a pain in the neck to
remove tiles that are set under a vanity.
Also, if someone replaces a vanity in 10 years, most likely the
tile won't be left behind anyway, as it too will be outdated.
The answer to the question is..... either way will work.