Being significantly underweight, or even recently malnourished with a normal weight can cause missed periods. So can the stress and trauma of he surgery and/or prolonged illness. Even if you had normal periods while ill, the surgery can tip the scales. Remember, the body will not allow pregnancy unless you are physically able to carry a pregnancy to term. The body's way of doing that is to stop ovulation, and susequently, menstruation.
As your general health improves, your periods should resume. However, sometimes this "surgical menopause" can be permanent, particularly if you were already in those perimenopausal years (30-49), where the ovaries are beginning to slow function anyway.
I was just shy of 40 at the time of my surgery. My periods stopped for about 3-4 months. When they resumed, they were lighter and somewhat irregular, until menopause at 50.
Jan