We say that atomic clocks are the most accurate clocks ever made, they may lose or gain $x$ seconds in $y$ years. How do we find this uncertainty because we do not have an ideal clock to compare with the clock that we made?
The nearest we have to a standard is International Atomic Time. This is:
TAI as a time scale is a weighted average of the time kept by over 200 atomic clocks in over 50 national laboratories worldwide.
The errors in individual clocks can be assessed by comparing them to the weighted average.
Re the mention of pulsars in your comment, pulsars slow down over time and indeed atomic clocks are used to track their slowing. Also pulsars occasionally glitch. So atomic clocks are more accurate than pulsars are.