There is no recipe to guarantee your dissertation a top first. But there are certain things that, time and again, hurt your dissertation mark and can ruin a degree result.
Fortunately, they are easily avoided. The most common are:
Leaving it until the last minute
Easily avoided, and one thing that is guaranteed to ruin the last spring/summer of your undergraduate degree as well as (invariably) your degree result.
Spending too little or too much time on it
Spending too little time on your dissertation is often a result of leaving it to the last minute. But it is equally important to be realistic in your planning and not to neglect your examined modules.
Stupid. Just plain stupid. And even if not intentional (it happens) it can ruin your degree (in some cases, it will end it).