On the top right of the Vehicle Orders dialogue, a "Timetable" button is available which will allow you to set a timetable for the vehicle. The timetable sets out the minimum time a vehicle is allowed to stay at a stop as well as the time allowed for the vehicle to move between stops.
This can help prevent bunching - rather than each vehicle moving to each subsequent stop as soon as possible, they will wait until it is time to do so. By building in a small buffer of time at each station to account for delays, just like real timetables, vehicles can run consistently to time.
It is important to ensure the timetable is realistic - the "Autofill" option can help to produce an initial timetable, by measuring one vehicle's travel time between stops and dwell time at stations, but an element of buffer time is important. For example, if the Autofill option measure a train taking 20 days to travel between two stations, it may be worth increasing that manually to 22 days if there is a busy junction outside the station. The timetable may also need to be adjusted further in the future, for example if passenger numbers increase then dwell time at stations will increase as more passengers need to be unloaded and loaded. Equally if older vehicles are replaced with newer, faster, vehicles then the time taken between stations will need to be decreased.
Vehicles that are running consistently late against the timetable will effectively revert to the current behaviour without a timetable - they'll only dwell at a station for as long as they have to for loading and unloading, then leave immediately. This will then lead to bunching again.
When vehicles use shared orders, timetables are also shared between those vehicles - although a vehicle's progression through the timetable is unique to it. In the past, vehicles had to be spaced manually when first introducing them and then the timetable would maintain that spacing. However, as of OpenTTD 1.4.0 an automatic spacing feature is available which can help to keep each vehicle spaced evenly apart. For this to work, it is still very important that the timetable is realistic and achievable - it's better to have some slack in the timetable (perhaps at a terminal station) than for the timetable to be overly lean and cause vehicles to almost always run late.
Further details about timetabling are available on the OpenTTD Manual.