how do I handle this?

The guy I've been seeing for a few months now has been so distant lately and he out of no where just stopped trying to make contact with me. It's like he's ghosting me. I really like him and I want to make it work, but how can I do that if he won't even want to talk to me? I feel like it's something I did to make him just stop out of no where.