I have Trek Marlin 5, Today I broke rear hub axle. unfortunately, shops are closed nearby, because of COVID-19, I only have solid hub axle. Is it okay to use solid axle instead of quick release?
Yes, QR axles can be replaced at will with solid axles for all standard axle hubs. (Standard axle means a hub that can accept a generic third party axle. Many hubs are not.)
Be mindful that the common toothed type axle nuts are good at tearing up aluminum and carbon frames. Use washers and grease the threads.