Generally building a bike will cost more. No matter how well you plan things rarely go so smooth that no redundant parts are needed.
But building a bike can be a lot of fun and will make maintaining it easier, since you already went through the tough part. And it is better way to go if you want something you can’t buy without significant mods to get there.
For gravel a 1x is probably the best way to go. A 40t ring with a 10/11-50 cassette should cover most anything you need including bikepacking.
Things do tend to not work out with a 1x if you need pedestrian low gearing and without sacrificing top end.
John