Start here. This is the direct spoken answer to practice first.
Overview
Both hooks synchronize with external systems, but their position around browser paint changes user-visible behavior and cost.
useEffect is the default for subscriptions, network synchronization, analytics, and other work that can happen after paint. useLayoutEffect runs after React commits DOM changes but before the browser paints, so I reserve it for measuring layout and synchronously correcting something that would otherwise visibly jump. Layout effects block painting and should stay small.