Why is he doing this?

I dated a guy and got rejected by him but we are friends so it's all good then out of nowhere he started to act weird

Examples:

Told him about a party: are these men from uni? Do you know them?

I asked him for advice bc one of my exes wanted to come back to my life he said i should reject him, i did, and i told him that i told the guy the exact reasons he listed for me as reasons why i won't give him another chance. My ex got pissed and told me that what i said is probably an advice only another guy could have given to me. His reaction: "yeah your ex probably realised that the guy who gave you the advice wants to keep him out of your life" i was like excuse me?

We joked about dying alone then i said: i should have just gotten together with my male best friend, then he said "well that would be me"

He also started to say things like "i immediately thought of you😘" (when he saw something i like) and "precious, darling" in a friendly way

Next he told me about a girl he talks to on a dating app who won't reply to him and asked me for advice but when i asked for details about the girl he only said she only replies like twice a day (i did this to him i intentionally barely replied to him for a week) no details about the girl didn't even say which dating app he only said they were talking about marvel movies (which is also interesting bc we matched on a dating app and this was exactly our first topic)

When i didn't reply til the next day he would say 'don't worry i'm used to girls ghosting me all the time'

So what kind of situation is this why is he being like this?

Why is he doing this?
Post Opinion