You can find a good answer in this article: https://insidegnss-com.exactdn.com/wp-content/uploads/2018/01/IGM_julaug14-solutions.pdf
tl;dr: the accuracy is calculated in the Kalman filter (of the GNSS receiver) used to estimate the position/velocity/clock bias/… from the raw signals. They mostly depend on “[…] the level of measurement errors induced by orbital inaccuracies, atmospheric effects, multipath, and noise”.