I usually replace the hardware on my bikes with titanium stuff from Amazon. It’s lighter, the better quality bolts and nuts are better threaded, and I haven’t had any failures. Most bolts on bikes are M5, M6, and M8, with an occasional M7 (like the stem clamp bolt on my Birdy), you just need to choose the correct length.