You'll definitely need to identify your power requirement before you can get into the cost comparison discussion. In my opinion the comparison between buy vs build is more about flexibility to expand over time and control the quality of components used rather than focus just on cost. If you build your own you can control costs also and come up with a similarly priced option. With DIY you can replace/upgrade components as your needs change.
I have a Yeti 1000 and wanted more capacity to run a few more appliances so I bought an Inergy Apex to use as a 2nd generator which I promptly returned after testing it (see my post on the Apex usage tax). The Yeti is very convenient, just plug in and use, and is far more cost effective in actual use than the Apex. But its expensive to expand and you need to add chargers/solar controllers it to improve its charge rate. My Yeti only cost me ~$850 at Costco so very inexpensive for what it does.
I'm now building a DIY (trans)portable into a Rigid Toolbox from HomeDepot with a BattleBorn 100a battery, 1500w inverter, battery monitor, and Victron 10a AC Charger. My use case is to maintain my refrigerator and freezer during short power outages. I'm working on adding solar charging to it as soon as I select my components. Without solar my costs so far have been around $1300. The components I chose were higher quality/cost compared to others on the market, but I felt more comfortable with what I believe are higher quality components. Certainly higher quality than what is built into my Yeti. That to me is the best part about a DIY. I can choose the parts, tailor the cost, service the system myself, and add another battery later if I want/need it. Note: My DIY is not as light, small, or elegantly packaged as the Yeti... just another tradeoff.
Like everything in solar, what's best for you mostly depends on your needs and how much effort/cost you choose to put into assembling it.