What's the relationship between homebrew and xcode command line tools？
Homebrew doesn't include a compiler and other tools that would duplicate Apple's development tools. Instead of that - it just asks for you to get the basic tools from Apple.

Xcode uses the same tools under the hood as homebrew - so you could satisfy this specific requirement either by installing the command line tools directly or via an Xcode install.

So, they aren't the same thing and you need both for the brew package manager to run.