I don't know what to do ..

I have a boyfriend & over the summer when I was on vac I spoke to my guy friend everyday, we never use to flirt till one day  and we kept going once I got back from vac I saw him and we kissed I didn't know what to do so I told my boyfriend that it was best if we stopped talking but he didn't want to so for a whole month I was acting different with him .. I had sex with the guy and  never again had sex with my boyfriend till 3 months later I don't know what to do.. the guy has a good life ahead of him and my bf isn't doing anything right now and it bothers me that he's not doing anything for he's future as well so idk what to do