Dried beans are a bit of a pain, but if you are looking to cut funds then you really can't do much better than dried beans.
Also, unsaturated fat is an important part of the diet. You need fat in the diet to absorb many nutrients. Skimping out on it can really negatively impact you. Olive oil and Avocado oil are my go tos. But you really wouldn't go wrong with peanut oil or canola.
Moreover, you actually need to count mostly only the protein intake, because when your food does not have enough calories that becomes obvious, because you lose weight.
Obtaining enough calories for a day requires spending only a small fraction of a dollar per day, for buying enough wheat flour or corn flour.
When you attempt to minimize the cost of food, most of the money will go for ensuring an adequate amount of protein, with an acceptable amino acid profile, and also for ensuring adequate amounts of essential fatty acids, vitamins and minerals.
Ensuring enough calories is by far the easiest part.
While there are long-term health issues with that, more acutely, you can end up in a low energy brain fog, that might make it hard to get enough protein to get out of said brain fog. I got stuck in that zone a few times when poor.