Can't tighten thru-axle
I suspect that with the wheel in the thru-axle is not aligned with the thread in the drive side dropout and isn't engaging.

If a nut came off your hub you really need to inspect the hub and check to see what else fell off. That looks like a locknut to me (can't see a bearing surface), if so you'd need to re-adjust the bearings at least.