It's like converting any A into a B - it's usually a lot cheaper and better to just buy a good B in the first place. It can be a fun project, and gives you something unique, but unless you can source the parts for way below retail, then $ for $ you're as well going for an actual gravel bike.
Given you can buy a new gravel bike for under about $700 retail (like this one - I had the older model which was even cheaper and it did pretty well -
https://www.halfords.com/cycling/bik...me-452950.html), I think it'd be challenging to build more suitable for less. Assuming of course you want it to do road and gravel.