I agree with most answers, clean it right after use in dirty/muddy environment, regularly clean and service it and periodically change gearshift cables and brake cables (if it applies). Avoid keeping it unprotected outdoors or in humid places. If this doesn't conflicts with your budget: don't let the saddle and grips or bar tape get too old, because depending on design and quality they degrade and show wear marks that the perfectionist eye hates.
But I would add: do not install (too many) accessories or decals. Some people tend to add more and more accessories with time. Adhesive decals, ties, etc. look good when recently applied or installed but over all, they alter bike aesthetic design intent, so when you look at it the image you get is far from being the catalog's photo.
Use paint and plastic/vinyl protectants that smell like new plastic/rubber. When you first get the bike it was probably recently treated with such protectants / embellishments, and if you went to a store, you probably got a lot of that smell, and your brain most likely associated that smell with the new bike. If one gets sloppy with cleaning, sooner or later the bike smells like old lube mixed with dirt, yikes!
Finally: keep an old bike near, change friend/ride buddies regularly, show them the old bike a couple of times then appear with the new one. Nothing says "new" like a few compliments!