My take: Unless you are really efficient at cooking, and can make many tasty meals out of few ingredients it is. Especially if you value your own time. You have physical costs in buying ingredients (many of which go bad before you can use them all) and the time cost of getting ingredients, the time cost of cooking, and the time cost of cleaning. When you eat out you can just pay once for the food and you can normally get multiple meals out of one serving like you can if you cook for yourself
It kinda depends what you’re making. You probably can’t grill proper burgers for much cheaper than mcdonalds anymore, sure. But one $3 box of pancake mix is enough for like 10 meals. Same idea with pasta or rice. PB&J is basically free for smaller lunches. None of those are really prep and eat later meals, but if you go that route, making one large batch of chili or soup or some kind of hotdish will also last a while for relatively cheap.
Even if you buy premade frozen stuff, a mini one person chicken pot pie thingy is like $2. Basically if you actually care about the money, groceries are 100% going to be cheaper. But if you mean “is it worth the time to make stuff that I might like less”, that’s more personal to you.