A gravel bike also known as a cyclocross bike is the best multipurpose bicycle for most people who will ride a mix of road and trail. If you get into longer road rides you can change the tires to more road specific or get a spare set of wheels.
Don't get caught up in all the hype about carbon...