That's quite a cute comic to understand how DNS works!
The crucial part is that every lookup reflects the state at one single point in time. If asked, the resolver will send back the IP address to the OS, no matter what it has to do to obtain it in the background. IPs usually don't change often, and IP address look-ups only take a few milliseconds at most (you don't have to wait minutes whenever you open a new website, do you 😅). However, if they change after a request was made, then the user will connect to the old IP. Depending on the migration strategy of the admin, the user might see a not-found error, or still get the site, because it is still served on the old IP for some more time.
Resolver and Operating system has connection like TCP?
TCP is one of many protocols used to communicate on the web. The OS and resolver communicate using their own protocol, the DNS protocol.