While the answer is that you need to carry the right tools to cover trailside repairs on your bike (there's no point including a full set of Torx keys if your bike doesn't have any Torx bolts), there are essentials we'd recommend...
4, 5, 6, and 8mm hex wrenches
Torx T25 wrench
Chain tool
Though to be honest, we don’t know a single tool that’s just boiled the useful basics down to that though, so expect to have 2, 2.5, 3mm hex, plus flat and cross-head screwdriver bits along for the ride. Alternatively, you can pick up a basic hex key and T25 tool for almost nothing (they come free with a lot of bikes) and then just carry a separate chain tool.