There is typically a governing standard for the particular vessel; eg: ASME Boiler and Pressure Vessel Code, API, BS 5500, etc. The particular Code will specify the allowable stress for the material based on temperature and other factors. A formula is given for the Code-required thickness based on the internal pressure, diameter, welding or forging joint efficiency, allowable stress, etc. The same formula can be inverted to find the pressure that corresponds to a given thickness. The MAWP would then be that pressure less any static head acting on the component.
That is a pretty simplistic answer as for circumferential stress in a cylinder or in a head. It can get more complicated than that once other Code criteria is considered for cone-cylinder junction reinforcing, nozzle reinforcing, etc.
For a complete vessel you would calculate the MAWP for each component. The smallest value of MAWP would govern for the vessel.
For example, in ASME Section VIII Division the required thickness for a cylinder (based on circumferential stress) is given:
t = P*IR/(S*E-0.60*P)
But if 't' is known then the maximum pressure is found as:
P = S*E*t/(IR+0.60*t)
You have to subtract the static liquid pressure from this maximum pressure to get the MAWP.