More to the point, why/how did it round out?
That botl should be used for preload *only*, ie: not very tight, if you’re doing it up so tight as to round it then you’re either working against an already tightened stem (ie: doing it wrong), or you’ll be putting so much load on the bearings you’re actually likely to be damaging them.
Anyway, unless it’s a fancy proprietary part like for a Hope Head-Doctor or a weird carbon bung then it’ll be a bog standard M6 thread. Normally with a 5mm socket cap head, but if your existing one is 4mm then possibly you have a top cap with a countersunk type fitting like Specialized/Canyon/others are fond of fitting?
Best bet if you’re not sure is take the old bolt with you to the shop to compare, or post a pic…