There has been loads of changes recently and there's more to come very soon. But in principle most benefits depend on Residency status and NI contributions.
Probably 3 months min residency will be needed just to start.
In addition to Residency Status there are a number of other rules that dictate social security benefits.
Theses will be available on the Department for Work and Pensions website
Or from HMRC
It always used to be that to qualify for most of the NICs based benefits you needed to have NICs on your NI record during the last two complete tax years.
It's certainly not an easy hill to climb.
Better to secure a job asap and start NI contributions for 3 months.