My ships have pretty low attack, and theirs have higher attack. Mine have no defense whatsoever, and theirs have a value of two for the 3 types. Also, they produce much faster than me... This game is hard.
The above shows why you lost the battles. Every hit on your ship went against its hull (hitpoints), while most or maybe even all of the hits you scored bounced off their defenses.
The mechanics of battles favors defenses early in the game. Your ship must score hits greater than the defense value for the remainder to go against the hull (hitpoints). If you're shooting with an attack of, say, 6 and their defenses are 2 of the matching defense and 2 of the both others, your best result may be 1 hitpoint and (more likely) you will get all 0s, unless you chose luck as a trait and are also Universalist Party, and/or unless you chose a very high attack trait or have seriously upgraded Red bases.
The suggestion I and others have made is not to start with the campaign, but to play a few non-campaign games first. There are clear patterns to research and expansion, and how to balance costs and building stuff. In some campaign scenarios, to the best of my knowledge, expanding too quickly simply enlarges the bullseye on your empire for others.
Oh, and if the DreadLords are ever on your map, they are the key enemy, best I can tell. Take them out first, even expansion is not as important. You must get Invasion and snuff them early.