Home loan question

I have a w2 job and a 1099 job. The w2 job is dragging me down and plus it’s running me ragged mileage wise.

My 1099 job is at home and I get as many hours as I want. A lot more money than my w2 one.

Here’s where my question comes in

Can I obtain a home loan with just a 1099 job OR by just paying cash?