How to track and detect CLS?

If you want to track and detect CLS, you would have to know if you want to track lab data CLS, CLS experienced by real users, or CLS for yourselves to be able to debug specific situations and conditions.

I wrote an article discussing 9 ways to track and detect CLS for yourselves and real users, which also contains a code snippet to test CLS for yourselves.