I quit my job and went back to school, did an MBA, racked up debt as I wasn’t working, got out, got a good job. This was when I was in my mid 30s. Increased my salary by multiple fold. Not sure you can do the same thing though since my MBA was 1 year and tuition was only a few thousand. That’s hard to find. Got loans and lived off savings so the 50k could be used for that.
If you think 50k is gonna make you rich by investing the odds are higher that you lose it all by trying to get rich.