@godislove19933 I too am 5'4. 140 lbs. Your listed calories would be a bulk for me...
I cut on about 16-1800 calories.
Sedatary job and gym 4 times a week.
You simply may not have been at a large enough of a deficit.
Progressive overload is a must to gain muscle.