Liquid surge refers to an excessive liquid inflow to a slug catcher or a separator and is one of the main issues in flow assurance. The wellhead choke valves of gas wells must be adjusted to maintain the target flow rate as the reservoir pressure drops. The wellhead choke opening can be determined by conducting multiphase pipeline transient flow simulations to achieve the target flow rate and avoid liquid surges. However, it is not financially and computationally practical to conduct many multiphase transient pipeline flow simulations simultaneously for hundreds of wells. We found that flow rates and maximum liquid surge volumes for gas wells can be predicted accurately using simple machine learning models when the wellhead choke valve is adjusted. The machine learning models provided accurate predictions (R2 > 0.99) regarding flow rates and maximum liquid surge volumes for different wellhead pressure drop plans, vertical and horizontal well lengths, and current operating conditions in cases involving two real fields, the Horn River Basin (HRB) and Rakhine Basin field. The wellhead operating conditions that are appropriate for achieving the target flow rate and avoiding liquid surges can be efficiently determined using the machine learning models instead of multiphase transient pipeline flow simulators. The proposed approach also accurately estimated downhole pressures that are necessary to evaluate reservoir performances given wellhead pressures and flow rates. Lastly, we presented what features are dominant in predicting liquid surge volumes, flow rates, and downhole pressures in feature importance analyses.