\$V_{CC}\$ and GND are distinct from, and (almost) unrelated to \$V_{IN}\$ and \$V_{OUT}\$. Your "inverter" circuit is representative of a single gate, and each such gate will have its own set of four terminals, but when there are many such elements in a single integrated circuit (IC), \$V_{CC}\$ and GND are shared, as I will explain.
An IC can contain many gates. The 7404 IC and its variants the 74LS04, 74HC04, 74AC04 amongst others, all contain 6 inverters, each having one input pin and one output pin which are independent from the power supply.
A single inverter (or other gate type) will usually be drawn without power supply pins, but really each one does have its own pair of supply terminals. They are almost never drawn on a schematic, it is expected that the reader understand that they are implied. I'll draw them explicitly here:

All the gates in a single IC share the same power supply, via the IC's pins \$V_{CC}\$ and GND, but their inputs and outputs are independent. Each inverter inside the IC will correspond to your own inverter schematic, but they all share the same power supply. If the gates inside the IC were all drawn with explicit supplies, the IC diagram would look like this:

The IC's two supply pins provide energy for all the individual inverters to operate. The 7404 and 74LS04, variants named "TTL" require a potential difference between \$V_{CC}\$ and GND of 5V, or very close. The so-called "CMOS" devices, 74HC04 and 74AC04 can operate with a supply potential difference of anywhere between 2V and 6V. An appropriate power supply would be connected to the IC like this:

I've used a battery to apply a 5V potential difference between the supply pins, but that could be any source of 5V. It's important to understand that engineers use the ground symbol to indicate the node which we deem to have "0V potential":

From now on, when I quote some potential such as "plus-five-volts, or +5V", that value is with respect to my arbitrarily defined "zero-volt point", or "ground", or "GND". Therefore, the positive battery terminal (or other voltage source), which is 5V higher in potential than its negative terminal, will have potential \$0V + 5V = +5V\$, and is labelled as such. Anything connected to the battery negative will have 0V potential.
The supply pins and input/output pins are independent, but not entirely unrelated. Supply pins also define what potentials the gates will interpret as "high", a logical "1", and low, logical "0". The positive supply pin (14, \$V_{CC}\$), determines what potential will represent logic 1, and the negative supply pin (7, GND) defines the potential that will represent logic 0. You have some flexibilty; any input potential close to +5V (say, +4.5V) will be interpreted as "high", and any input potential close to 0V (say, +0.5V) will be interpreted as "low". See the IC's datasheet to learn the exact threshold potentials.
Since all connected nodes have the same potential, if you wish to signal to an inverter that its input is logic 1, you may simply connect that input directly to \$V_{CC}\$, +5V. That may be the source of your confusion, causing you to associate \$V_{CC}\$ with an input or output. The supply pins and the input/output pins are only related in-so-far that the supply pins define logic level potentials, and the others interpret signals based on that information. Similarly, connecting an input directly to GND, 0V, will signal to the inverter that its input is low, logic 0, but that does not mean that the GND pin and an input or output are "the same thing". The potentials may be the same, but supply and signals are otherwise unrelated.
Since an inverter inverts, in the diagram below, pin 10 is at 0V potential, pin 8 is at +5V, and pin 2 has +5V:

It is not wise to assume the potentials of any unconnected pins, since ambiguous inputs produce ambiguous outputs. Nor is it wise to leave any input unconnected, unless the datasheet tells you it's safe to do so. Different ICs behave differently in such circumstances, and it's up to you to read the datasheet and learn about the IC's quirks. In general, TTL ICs will interpret an unconnected input as high, but CMOS ICs make no such promise. Leaving a CMOS input unconnected is likely to cause oscillations, RF emissions, and unnecessary power consumption. You are advised to connect the inputs of every unused gate to either 0V or +5V, to prevent this.
You do not have to provide an input potential by connecting the input directly to one of the supply "rails", 0V or +5V. Any source of potential can be used, perhaps the output from another gate, or a comparator, or switch+resistor combination, anything, really. Just make sure that the source of potential never falls outside the range 0V to +5V, or whatever supply potentials you have employed. For example, applying +7V to the input of a gate powered with 0V and +5V will likely damage it. Applying +2.5V to an input won't cause damage, but that's an ambiguous logic level, and you can't be sure what the gate's output would be, or even should be.
If your schematics had to include every detail of the circuit, as mine above have, they can quickly become very cluttered. Usually, therefore, only the critical details are included, the rest is implied. My last schematic above could be drawn like this:

simulate this circuit – Schematic created using CircuitLab
An engineer reading that could infer some pertinent information that isn't shown explicitly. For example, the inputs to gates are 0V and +5V, implying that the gates' supplies are 0V and +5V also. The pin numbers are also shown, and from that it can be assumed that this is an IC, the name of which will surely be found elsewhere in the schematic or documentation.
Just to drive home the idea that \$V_{CC}\$ & GND are distinct from inputs & outputs, related only in the sense that they define what is "high" and what is "low", consider this circuit:

simulate this circuit
Here we have three separate ICs, powered by three separate voltage sources. Their grounds are all connected together, so that each IC (and all the gates within it) has the same idea of what "zero volts" is, but they are otherwise all independent.
Still, they will work just fine. The NAND gate IC (74'00) produces its own output potential from its own supply, but it does not care which power supply is used to source the potentials at its inputs. All it cares about is input potential, not the source of that potential. That source can be its own \$V_{CC}\$ or GND, or literally anything else, anywhere else.
Since any output here can be +5V or 0V, it is also incorrect to directly equate \$V_{CC}\$ or GND nodes with an output, although internally a gate will use either its own \$V_{CC}\$ or its own GND to derive its own output potential. They are related, but they are not the same thing.