If I’m texting with my wife, and we start talking and I later on feel something wet in my pants. Is my fasting still accepted? And is it necessary to do Ghusl or not?

If what you’re describing is pre-ejaculate then no it does not invalidate the fast or necessitate ghusl.