Cordless drill or impact driver for household projects?
I've got both (both Makita LXT tools). They're very different devices, despite the visual similarity, but at a push both can be used in place of each other. I also own a pillar drill and a mains SDS drill.

But if you've only got one, for general DIY, get a cordless drill (and get a good brand one), as it's a lot better as a driver than an impact driver is as a drill.

Cordless Drills

A drill can drill excellently – not as well as a pillar drill for precision or power (e.g. if you're drilling steel), and not as good as an SDS for concrete / engineering bricks, but pretty well in most circumstances. A good cordless drill should still be ok for smaller holes in steel, and may be ok on brick/concrete depending on your drill, the hole size, and the hardness of your bricks.

It can also drive screws fine in most scenarios, but will struggle with longer screws, e.g. decking. They're usable with sockets, though I don't do enough of that type of work to really say how good it'd be for e.g. car mechanics.

Because the speed is adjustable with trigger pressure, they're great for assembling bolts in flatpack.

Impact drivers

An impact driver excels at driving screws, and drives long screws with ease, and much, much faster than a drill does. Get one if you ever board a loft or do decking, or any other task that involves lots of screws.

It'll drill a hole in plasterboard with ease, and it's passable in wood with smaller bits (you'll need the more expensive hex drill bits), e.g. pilot holes. But it's nowhere near as good as a drill compared to using a drill to drive screws. Don't bother using it for brick or steel.

They're also not good for assembling (some types of) flatpack furniture – they tend to over-tighten bolts, and can over-drive screws, which can lead to putting a screw or bolt through the front surface of furniture (flatpack often has very little leeway for over-driving screws), or cracking the surface of furniture (if it's got a plastic or veneer finish).

Conclusion

My purchasing recommendation would be:


A good cordless drill
SDS drill – if you need it for your brickwork. I'm in the UK so houses are brick, but even still, many houses the bricks are drillable with a cordless drill on hammer setting. Unfortunately, mine are super hard.
Impact driver – nice to have, but less useful; get one the first time you have to drive hundreds of screws.
Pillar drill – great for woodwork &amp; metalwork, but not really a DIY tool for 'household' jobs.


Make sure you buy a good brand if you can afford to – personally, I went Makita, based on what friends and contractor I know use, but having had a cheap one, a good brand really does make a difference.

Buy all your cordless tools from the same set, so they share batteries. I now have ~8 Makita LXT tools (including a handheld hoover – great for keeping the house clean!). You'll save a lot of money and hassle having all your tools share batteries.