When the United States was founded, each state wanted to protect its own power.
Smaller states were afraid of losing power to larger states. Larger states were afraid that even though their population was larger, they would not be proportionally represented in the legislature.
A compromise to address these concerns was a legislature with two houses (“bicameral”).
Representation in the House of Representatives is based on population. States with more people have more representatives (for example, New York has close to 30 representatives, New Hampshire has only 2).
Every state has two representatives in the Senate, regardless of population. In this way, the Senate can check the House of Representatives.