D76 is the most popular B&W developer of all time so it is more than decent but any general purpose developer will be fine: D76, HC110, ID11, etc.
Developers are either in the form of powder or a liquid concentrate. Liquid developers are easy to mix and you can mix up just as much as you need each time you develop film. But, liquid types are heavier and shipping charges are higher if you order online. Powder developers take a little more work to mix and you must mix up the entire package.
A powdered developer contains a number of different ingredients in exact proportions all inside a foil pouch. The proportions are very important. If you only mix part of he package there would be no way to ensure you maintained the correct proportions of ingredients. Varying the proportions will produce a developer that performs quite differently or may even not perform at all. If you only mixed part of it you wouldn't be getting the ingredients in their correct proportion or may even miss certain ingredients entirely.
Of course, there are people who ignore this and mix up partial packages of powdered developers anyway and swear it works fine but in starting a new endeavor it is always best to ignore the advice of people who believe they "know better" than to follow simple directions from developer mfrs.
Yes, once a developer is mixed it is called a stock solution and can be stored for a while but the length of time it can be stored varies. Go by the mfr's directions on storage.
One of the longest lasting B&W developers is Diafine. Some claim they've used the same stock solutions for years after mixing. I wouldn't go quite that far with it but it does last a long time. It is a two-part developer, that is, you mix up two different solutions and use one for a certain time and then the other. Then you go to your stop and fix steps, etc. Another convenience with Diafine is that it works the same over a wide temperature range so, within normal room temp ranges, you don't have to worry about temperature as you do with most other developers. In most cases you also don't have to vary development times with different films either when using Diafine so it is probably the easiest developer of all to use. But, Diafine is a push-type developer so it is best used when you want to push process film (shoot at a higher ISO than normal for a particular film).