After just a couple of months it's fine to do it via text, or a call if you wish. You can fire a warning shot maybe by messaging first:
'Hey, hope you're okay! So I wanted to have a chat about how things are going with us, but thought it'd be better via phone. Are you free to talk later?'
Anyone with any social nous will recognise that as a 'we need to talk' and hopefully ask more or agree to talking. If they ask what it's about you can say
'I've realised we might be better off as friends, so I wanted to let you know' or something.
Or you can just end it via message:
'Hi. I know this is an awkward thing to do via text but I thought it was better to do sooner, I've been thinking and I reckon we're probably better off as friends, I'm not sure I feel the 'spark' and I'm guessing you feel the same too. Happy to chat about it if you want to'
I think it's kind to add the 'I'm guessing you feel the same too' as it gives the other person an 'out' to save face. They can say 'yeah, me too' if they find rejection really painful. None of this is necessary or something you absolutely owe them, but there are kinder ways to dump someone and less kind ways. It's only been a couple months though so don't sweat it, that's the very early stages of dating and the whole point is to see whether you want to continue or not. You don't, so it's kinder to let him know now you've decided.
If he's a decent guy he'll be okay with it even if he's hurt. It's just dating, you're not doing anything wrong. Sometimes you give sex a try hoping it'll confirm either way how you feel about someone and sometimes the sex itself confirms it isn't gonna go any further, nothing wrong with that.