The case and bullet determine the length of the cartridge, or what is called COL (cartridge overall length).
You are thinking of the whole cartridge, as many people do. The cartridge is formed with 4 components.
Using a longer bullet requires a deeper seating depth into the cartridge to maintain the designed COL. This could mean a smaller powder charge or a compressed charge. Either option can change the internal ballistics of the load and increase pressure inside the case. A lot depends on the cartridge being used and the powder charge. With so many different calibers, cartridges and powders the variables are unlimited in number.
When reloading there are other factors as well that affect whether the cartridge will fit into the chamber and or function properly. A case that is to long protrudes into the throat of the bore will not expand. This condition can cause increased pressures in the case and may burst the primer or the case allowing high pressure gas to escape back into the gun.