Heller has a large history of winning Nevada elections.
But Nevada has also been drifting D over the last few decades, largely due to the steady increase in the Hispanic electorate especially in Greater Las Vegas and Greater Reno. The image that you have of Nevada as "cowboy country" applies to cattle, sagebrush, and irrigated farming... and it is not where the voters are.
Look at the vote totals for Robert "B1 Bob" Dornan in his California district. He could win as a Reaganite Democrat in his district in southern California for years, and he was by all accounts a crafty and shrewd politician able to get the vote out.Eventually the demographics defeated him.
That is how Nevada is going.
That's not universally true. At the Presidential level, Nevada trended Republican in 2012 and 2016.