There is no "minimum" nor "optimal" amount of work experience. Some universities have particular work experience requirements (e.g. Warwick asks for X months work in a healthcare setting) but most don't and there is certainly not a universal rule.
Work shadowing is good for understanding what a doctor does and some of the nuances that come up in their day-to-day work. Long-term volunteering is good for becoming "part" of an organisation, getting to know staff/patients/clients, showing commitment, and giving the impression that you care about (helping) people.
If you have lots of time to plan, I would recommend:
-One long-term commitment (e.g. volunteering or a part-time job) over months/years in a healthcare or caring role, e.g. working with the disabled, elderly, homeless, small children, etc.
-Work shadowing placements in a variety of settings, e.g. GP, hospital, community services (pharmacy, hospice, district nurse, etc).
Most people aren't able to arrange all of the above and lots of places are offered each year to applicants with only one type of work experience. As others have said, it's much more important to show what you learned from work experience than just to describe lots of different placements