Can somebody explain how Docker interacts with Linux network-card and UFW?

Is there a “picture” or good explaination which explains how Docker in “bridge” mode interacts with ufw firewall? Some kind of routing/calling plan, how a packet passes all the stacks? I try to understand how that works for IPv4 and IPv6.

If you haven’t read yet, there is this in the documentation:

And I also wrote about networking once, but not related to ufw at all