Some laws are made at the federal level and some laws are made by the states. For example, laws on commerce, bankruptcy or taxation are made at the federal level. State and local governments pass laws about property, divorce, custody, and other matters that really don't affect anyone outside of that state.
The U.S. Constitution limits the lawmaking of the federal government to laws that stem from the "commerce clause" which gives the federal government the power to regulate anything having to do with "interstate" commerce or commerce across state lines. For example, federal laws can be made that.
Regulate "interstate" commerce, which is commerce across state lines.
Regulate how financial transactions are made and how bankruptcy can be granted.
Protect consumers such as product safety.
Protect the civil rights such as Title VII of the Civil Rights Act of 1964
Regulate income taxes, as allowed with the 16th Amendment.