How does cid make power?

What it boils down to in reality is chemistry. An engine runs on oxygen from air and hydrogen in a hydrocarbon fuel. Combustion is a chemical reation that generates heat. To burn all the fuel requires a set quantity of air (oxygen) so that all the hydrogen is oxygenated. For our gasoline engines this is about 14.7 pounds of air mixed with 1 pound of fuel. Now this is for theoretical complete combustion. Fuel quality and any additives can/will modify this. For maximum power and considering all the liquid fuel is not likely fully vapourized, a richer mixture is required of about 12.5 to 1.
1 pound of fuel contains the capability to produce a value of power or more like pressure. A typical street engine has about 80%VE. So a 400 CID engine pumps 80% of its displacement in air, or 320 cibic inches in two revolutions. The combustion in the cylinders produce torque at the flywheel. This is what an engine dynomometer weasures. It does not measure power. Horsepower is a calculated value using the measured torque and RPM. A larger displacement engine pumps more air and fuel to make more torque. Camshaft design and head port efficiency will determine at what RPM that torque will be developed. With compression ratio (both static and dynamic) about equal, more displacement will develop more torque.
The old musclecar engines of 427 and 450 CID produced up to 450HP, as advertized. Most were in the 450 to 480lb/ft of torque range. Maximum power was about 5500RPM.
F1 engines have normally been regulated to 122 to 181 CID. The turbo cars were limited to 90CID. The Renault engines were essentially from a joint passenger car V6 jointly developed between Renault, Peugot and Volvo. In North America we saw this engine in Volvo 240 series cars at 2.6L or 158CID. These were destroked to reduce the displacement to 1.5L. Then a bunch of expense parts were used internally so they would last at 15,000RPM while turbocharged. These engines made phenominal power at high RPM but as a street engine are useless, especially in a 3,500 pound family car.
To get more street useable torque out of a 225CID engine similar to a 450CID engine, use a supercharger to push the same air and fuel volume through it as what the 450CID engine pumps. Boost with strong enough components will not wear an engine out or cause early failure as much as raising the RPM. Boost loads the crank, pistons and rods more, but not like RPM. Stress on the reciprocating assembly is squared as RPM is doubled. This reduces engine life expectancy quickly.
Big industrial engines have block castings with cast iron 1" thick to withstand the vibration loads inflicted on it. These engines will produce 1,200HP at 1,200RPM 24/7 for years. Head swaps to replace worn valves and sometimes a cracked head and occasionally an inframe overhaul, but the block and crankshaft may be intalled without removal for 20 or 30 years. You can get a big block to make that power, ricers make that power. But they sure do not make the torque and last that long. Do the math to calculate the torque produced by a Sulzer marine engine that produces 10,000+HP at 100RPM. These engines idle at 10RPM. Pistons are 1 meter+ in diameter with a stroke of 6 feet or so. Head studs that hold the heads and cylinders in place are like telephone poles.

I get and agree with what you stated here, My original question was very ambiguous, what I was getting at most say added cid equals added hp 100% of the time, My question is what's stopping the lesser cid from spinning up displacing similar air to make similar hp with same/similar top end parts. Like eg.. 318 vs 360 360 vs 408 400 vs 500 even 289 vs 396 etc..