United States – After a refusal of entry, how long do I have to wait to apply for a US B2 visa?

I come from the UK and I am 27 years old. My girlfriend lives in Chicago in the United States. I have been with her for 3 years. I went to see her last year in July 2018, I stayed 3 months and I got an ESTA.

Then I tried to return in December on ESTA. I was refused entry at the border, sent home and my ESTA was canceled.

Now, I need a visa to go see her. I am worried because I am afraid of being denied. I do not work in the UK, not for a few weeks; I live in an apartment, but I only moved in early February.

I do not know if I should apply for a visa or if it is too early and should I wait a month or two because I just have an apartment? What should I do?