How does apple verify my list of trusted devices and browsers?
This is ensured by storing a cryptographic proof in cookies on your local computer. In authentication schemes like this, it is often named a "token".

This allows Apple's server to later confirm that the browser is indeed trusted because the contens of the cookies are sent automatically to their server when you browse for example www.icloud.com.

The cookies are prefixed X-APPLE (for example X-APPLE-WEBAUTH-HSA-LOGIN. 2FA is HSA version 2). You'll be able to see these cookies for yourself by opening the developer tools while on for example www.icloud.com, and then access the Resources tabs and select Cookies.