generateMetadata resolves as part of rendering the page, so where its tags land depends on when the page renders.
Prerendered routes. Metadata is resolved at build and written into <head>. A force-static page with a no-store fetch in generateMetadata had its <title> before <body>, and the API was hit once, during the build.
Per-request routes stream it (since 15.2). On Next.js 16.4.5, with generateMetadata awaiting a 2-second fetch, a browser user agent got the 200 and a shell (charset, viewport, scripts, the page's own HTML) at 74 ms. <title> and <meta name="description"> arrived at 2,101 ms, appended inside <body>. Chrome 156 and Firefox 159 both left <title> in <body>, with JavaScript on or off; it still names the document, because HTML takes the first <title> in tree order.
Bots that only read HTML wait. Per request, Next.js tests the user agent against htmlLimitedBots, a regex whose default list includes Bingbot, Twitterbot, facebookexternalhit and Google's non-search crawlers. facebookexternalhit/1.1 got its first byte at 2,061 ms, with the tags in <head>. Googlebot is left off on purpose because it runs JavaScript, so it got the streamed version, like curl.
Dedup. generateMetadata runs in the same render as the page, so the fetch both made was one request per page load (the rules are in the fetch memoization question). A plain function standing in for a database call ran twice per request; wrapped in React's cache, once.
Cache Components. With cacheComponents: true, an uncached fetch in generateMetadata on an otherwise static page failed the build: "Next.js encountered uncached or runtime data in generateMetadata()". Either add 'use cache' (the title went into the prerendered <head>), or render a connection() marker inside <Suspense>: the route becomes partially prerendered and the metadata streams after the shell.