Depends. Copyright begins when a work is 'fixed in tangible medium or expression.' This means effectively when something is made available to be 'perceived, reproduced, or otherwise communicated.' While you technically have copyright from the point of creation, that's legally irrelevant if not one sees it, there's no right to be claimed or enforced. Copyright periods start when it becomes fixed, not when you first jot down the words.
The date in the copyright statement doesn't matter other than as indicative. Copyright is a private right, as such the onus is on the holder to demonstrate it if challenged. So if challenged in this case, you've have to provide evidence that the book was either published in 2016 or 2018. Legally, of course, if you've said something has a copyright date of 2016, you'd have a bit more work to do to prove 2018. That said, it's not entirely uncommon for the published copyright date a year and occasionally two ahead simply because publishers put the current year on the publication regardless, because they don't to publish a first edition that's looks two years out of date and it nudges the copyright forward. I'm not sure why they'd put a date before publication though, there's little point, it's better to claim copyright from publication.
Of course, there's an additional dependency if you've assigned copyright to the publisher, or unreserved any rights.