I have been thinking about something that I read on the Wikipedia page for the 2020 New Hampshire Democratic primary: "This was the third consecutive contested Democratic primary in which New Hampshire voted for the candidate that did not receive the Democratic nomination." Is that statement correct?
Yes, in the last three contested Democratic primaries, the winner in NH did not win the national nomination.
2020 was contested, and won in NH by Sanders. Biden won the national nomination.
2016 was contested, and won in NH by Sanders. Clinton won the national nomination.
2012 was uncontested.
2008 was contested, and won in NH by Clinton. Obama won the national nomination.
Note that this is only correct in terms of popular vote - in terms of delegates, both in 2020 and 2008 the two candidates with the highest vote share both received nine delegates each, meaning that both Obama and Clinton won the same amount of delegate backing from the state.