They are bad at both.
I would recommend and entry level aluminum frame gravel bike. But gently used and maintain it and it will last for years.
The Pro's ClosetChoose from the largest selection of certified used, pre-owned & new cyclocross and gravel bikes for sale from top bike brands like Trek, Specialized, Salsa, and more. All our cyclocross and gravel bikes are carefully inspected and guaranteed. Enjoy 30-day returns and hassle-free shipping to start...
https://www.theproscloset.com/collections/gravel-bikes-cyclocross.oembed[https://www.theproscloset.com/collections/gravel-bikes-cyclocross?sortBy=storefront_products_price_asc]
Don’t know what your budget is. If budget is tight check local Facebook/Craigslist listings and have a bike shop look it over/get it ready to ride