Wa'alaikumassalam! Jangan risau sangat lah, at 18 weeks, on-off perut sakit macam tu is actually quite common, especially for first-timers. Could be ligament stretching (round ligament pain), baby movements, or just your uterus adjusting to the growing bump. The fact that baby movements are okay is a good sign lah.
My neighbour went through the same thing at that stage and her doctor said as long as there's no heavy bleeding, spotting, or constant cramping yang tak hilang, it's usually normal. But since you're worried, definitely mention it to your doctor or midwife at your next check-up, they can give you peace of mind and rule out anything else. First pregnancy memang makes you extra-aware of every little thing, so it's okay to ask!
AUNI AISYAH