The main function of a legislature in a state is to make laws that apply to that state. We use the term “legislature” as the generic term for the legislative branch of each state. Some states simply call their legislatures “the state legislature” while others have other names. Either way, the main function is to make laws.
In our governmental system, we have three branches of government. These are the executive, the legislative, and the judicial. The general function of the legislature is to make laws. The executive’s main function is to carry out the laws. The judicial branch interprets the laws when there are disagreements about their application in a given case.
State legislatures do have some other function. For example, they participate in oversight of the executive branch. That means that they look into what the agencies of the executive branch are doing to make sure that those agencies are acting in accordance with what the legislature wants. However, the main function of a state legislature is to make laws for that state.