At a party last night, a girl was staring at me a counted that as interest, said a joke that was not funny she giggled a few times

We were in the kitchen while that happened then we move to the sitting room sat beside her instant shutdown?

How do I avoid that situation again?