The trackpad stopped giving haptic feedback suddenly however force touch and other gestures are working fine. Hence, it didn't seem a hardware issue. Also,I did SMC reset and NVRAM/PRAM reset. No improvement.
The “haptic engine” is basically an electromagnet that causes a vibration in the trackpad and is “outside” how the trackpad capacitive touch sensors work. Something in that system has failed.
So even though your track pad works for input, you need to take it in for service because the trackpad needs to be replaced. Technically, the entire top case, which is comprised of the case, keyboard, trackpad, and battery will have to be replaced. If your Mac is not under warranty, I would just live without the haptic feedback until you have to replace the battery due to age - it’s an expensive fix