With Thru Axles always always always screw it right back in when you remove a wheel. I do it each and every time no matter what I am doing even if a quick flat fix or popping out for a second for some reason. If it becomes muscle memory no more lost skewers or thru-axles in this case.
However for Thru-axles there are different thread pitches and different lengths and widths. The front could be 12mm or 15mm (or 20mm) 100mm or 110mm (which is usually boost but not always)
This is a great resource:
https://robertaxleproject.com/what-axle-do-i-need/
I might also recommend having some spares so if your bike came with some you might replace them with some nicer ones (maybe a little color or some other cool features or MUSA from Paul or RAP) and then keep the old ones as spares maybe in the glove box or parts bin (and mark them for what bike they are for) or in your tool kit.