The bolts and the tube in the picture comprise the part called your front thru-axle.
The way the world currently works is that thru-axles for the most part are supplied by fork and frame manufacturers. They have to match the fork/frame in terms of overall length, threaded length, thread pitch, and interface of the bolt head (some are countersunk, and flat-shouldered ones have to have enough space). The bolt itself isn't a generic part.
The order of operations I recommend here would be:
- Email the fork manufacturer if it's a suspension fork or the bike manufacturer if not and see if they can help you out. The hope here is that in a lot of cases, companies have warranty departments that sometimes just have stuff like this and can drop it in the mail. They may ask you to go through a dealer. Include the picture you took in the email as well as full info about the bike (model, serial number.)
- If that's unsuccessful you're probably looking at trying to get a whole new axle. There are other questions on here about how to size them. It's off a suspension fork and generally speaking fork manufacturers all sell replacement thru axles for their forks.
- Just using a hex cap screw and a big washer is very likely fine, but there's a degree of at-your-own-risk-ness because it's more or less the most safety critical fastener on the bike.