Ellington, Justice. Pursuant to a granted interlocutory appeal, Deborah Gonzalez, District Attorney for the Western Judicial Circuit, challenges an order of the Superior Court of Clarke County denying her motion to dismiss Jarrod Miller’s complaint filed pursuant to the Open Records Act (“ORA”), OCGA § 50-18-70 et seq. Miller averred that Gonzalez, individually and in her official capacity as district attorney and as the custodian of public records for the district attorney’s office, violated provisions of the ORA, and he seeks, among other things, enforcement of his requests for public records. Gonzalez contends that neither she nor her office is subject to the ORA because district attorneys are constitutional officers of the judicial branch of government. She also contends that Miller lacks constitutional standing to bring an enforcement action under the ORA and that prosecutorial immunity bars Miller’s suit. Essentially, this appeal is about whether Miller’s lawsuit to enforce the ORA against the District Attorney’s office may proceed. As explained more fully below, the lawsuit may proceed because Gonzalez has not shown reversible error. Therefore, we affirm the order of the trial court. 1. Standard of Review and Pertinent Facts. This appeal presents questions of law, and questions of law are subject to de novo review. Hardin v. Hardin, 301 Ga. 532, 536 (801 SE2d 774) (2017). Additionally, “a trial court’s ruling on a motion to dismiss for failure to state a claim for which relief may be granted is reviewed de novo[,]“ Northway v. Allen, 291 Ga. 227, 229 (728 SE2d 624) (2012), as is a trial court’s ruling on a motion for a judgment on the pleadings, Reliance Equities v. Lanier 5, 299 Ga. 891, 893 (1) (792 SE2d 680) (2016). We accept as true “all well-pled material allegations in the complaint and [resolve] any doubts in favor of [the plaintiff].” Greene County School Dist. v. Circle Y Constr., 291 Ga. 111, 112 (728 SE2d 184) (2012). “For the purposes of a motion for judgment on the pleadings, all well-[pled] material allegations of the opposing party’s pleading are to be taken as true, and all allegations of the moving party which have been denied are taken as false.” (Citation and punctuation omitted.) Trop, Inc. v. City of Brookhaven, 296 Ga. 85, 86-87 (1) (764 SE2d 398) (2014). The pertinent facts of this case are as follows. Deborah Gonzalez is the District Attorney for the Western Judicial Circuit, which is comprised of Oconee and Athens-Clarke Counties. See OCGA § 15-6-1 (42). Miller avers that he is a citizen, taxpayer, and resident of Athens-Clarke County. In his complaint, Miller alleged that Gonzalez failed to uphold her duties under the ORA to produce public records related to the various functions of the district attorney’s office, including records that show “unprecedented staff shortages, staggering caseloads, violations of crime victims’ rights, failure . . . to effectively prosecute criminal cases, and an open disregard for the laws of the State of Georgia.” Miller’s counsel, Kevin Epps, had previously sent requests for various public records on Miller’s behalf to Gonzalez and the district attorney’s office pursuant to the ORA. Miller also filed a mandamus action to compel Gonzalez to perform certain duties.[1] Miller asserts that Gonzalez responded to Miller’s ORA requests through her government email account and signed all invoices related to the requests with her e- signature, which Miller contends shows that she was acting as the custodian of public records for the district attorney’s office. However, Gonzalez allegedly failed timely to produce all of the requested records, which Miller contends violated the ORA. Miller filed a verified complaint on June 7, 2023, seeking to compel Gonzalez to produce the previously requested public records maintained by the district attorney’s office and to obtain other remedies available under the ORA. He also alleged that Gonzalez directed at least one of her employees to delete or destroy correspondence between Gonzalez and an assistant district attorney. Miller filed the complaint against Gonzalez (a) in her official capacity as district attorney and ORA custodian for the district attorney’s office based on her alleged failure to timely produce or to permit the inspection of the requested public records, and (b) in both her individual and official capacities based on the alleged knowing and willful destruction of correspondence he contends constitutes a public record. The “district attorney’s office” is not named separately as a party to Miller’s complaint. When Gonzalez filed her answer to Miller’s complaint, she also filed a “Motion to Dismiss Complaint and Motion for Judgment on the Pleadings.” In that motion, Gonzalez argued, among other things, that neither she nor her office is subject to the ORA because she is a constitutional officer of Georgia’s judicial branch of government, that she is shielded from Miller’s private action under the ORA by prosecutorial immunity, and that Miller lacks standing to enforce the ORA claims Miller asserted. The trial court held a hearing on Gonzalez’s motion on November 2, 2023. The following day, the trial court filed a written order denying the motion in large part.[2] The trial court rejected Gonzalez’s argument that, as a district attorney, she is a “judicial officer” under Ga. Const. of 1983, Art. VI, Sec. VIII, Par. I, stating that “[n]otably absent from any of [her] duties is anything that resembles the interpretation of state law or the adjudication of civil or criminal cases.” The trial court concluded that Gonzalez “is a prosecuting officer who has the duty to appear in the superior court and represent the state in felony proceedings,” which “is not a judicial function.” The court reasoned that “[t]he district attorneys['] duties are pre-eminently executive since they are Georgia’s prosecutors for felony cases.” The trial court impliedly rejected Gonzalez’s argument that she is entitled to prosecutorial immunity from a private suit brought pursuant to the ORA.[3] The trial court further ruled that Miller had standing to bring the ORA enforcement action under OCGA § 50-18-73 (a). On November 7, 2023, the trial court granted Gonzalez’s request for a certificate of immediate review, and this Court granted her application for an interlocutory appeal on December 27, 2023.[4] In her appellate brief, Gonzalez contends that the trial court erred in denying her motion to dismiss the complaint, reiterating her trial court arguments. The trial court held as a matter of statutory construction that the ORA applies to public records maintained by district attorneys’ offices and rejected Gonzalez’s constitutional arguments to the contrary. We agree. We hold that the text of the ORA applies to district attorneys’ offices; that Gonzalez’s separation-of-powers argument fails because district attorneys’ offices exercise executive power; that Miller has constitutional standing to bring this enforcement action against Gonzalez; and that the constitutional prosecutorial immunity conferred upon district attorneys does not bar Miller’s official-capacity claims against Gonzalez. 2. Standing. Gonzalez contends that Miller lacks constitutional standing to sue because he did not personally make the ORA requests at issue here. However, in his verified complaint, Miller averred that he requested “through [his] undersigned counsel” public records from the district attorney’s office pursuant to the ORA. He further averred that he brought the enforcement action to compel Gonzalez to perform her duty to produce or to provide access to the public records that he sought under the ORA. Gonzalez argues that, because Epps, Miller’s attorney, made the ORA requests without revealing to her that he was acting on Miller’s behalf, Miller’s complaint seeking enforcement of the ORA is a “derivative action” and that Miller is merely a proxy for Epps, who is the “real party in interest.” Gonzalez contends that, under these circumstances, Miller has not shown that he suffered a sufficient cognizable injury separate and apart from the statutory authorization to bring a suit to enforce the ORA. See Sons of Confederate Veterans v. Henry County Bd. of Commissioners, 315 Ga. 39, 54 (2) (c) (880 SE2d 168) (2022). As explained in Division 1, supra, we accept as true “all well- pled material allegations in the complaint and [resolve] any doubts in favor of [the plaintiff].” Greene County, 291 Ga. at 112. Here, we must accept as true that Miller directed his attorney to make the records requests on Miller’s behalf. Thus, contrary to Gonzalez’s argument, Miller has alleged that Gonzalez violated his right to inspect public records under the ORA by not complying with his request to inspect those records. Absent any other argument from Gonzalez on the question of Miller’s constitutional standing, we must accept that Miller has alleged a cognizable injury sufficient at this stage of the litigation to establish constitutional standing. See Sons of Confederate Veterans, 315 Ga. at 54 (2) (c). 3. Open Records Act. Gonzalez contends that Miller’s complaint must be dismissed for failing to state a claim upon which relief may be granted because neither she nor her office are subject to the ORA. The text of the ORA does not support this contention. (a) The ORA applies to public records maintained by district attorneys’ offices. Code section 50-18-71 (a) provides, in pertinent part, that “[a]ll public records shall be open for personal inspection and copying, except those which by order of a court of this state or by law are specifically exempted from disclosure.” The statute further provides for how “agencies” are to maintain their records and how they are required to respond to requests for those records. See OCGA § 50-18-71 (a) through (k). The ORA thus imposes a duty upon “agencies” to produce or to provide access to public records upon a proper request.[5] See OCGA § 50-18-71 (b) (1); Campaign for Accountability v. Consumer Credit Research Foundation, 303 Ga. 828, 830 (2) (815 SE2d 841) (2018) (“Government agencies therefore have a duty to disclose public records unless relieved of that duty by a specific exemption or court order.”). “Agency” is defined in the ORA by incorporating the definition of “agency” set forth in the Open Meetings Act (“OMA”).[6] See OCGA § 50-18-70 (b) (1). As defined in the OMA, “agency” serves as a placeholder for an expansive array of state and local government entities and means “[e]very state department, agency, board, bureau, office, commission, public corporation, and authority[,]” as well as “[e]very department, agency, board, bureau, office, commission, authority, or similar body of each such county, municipal corporation, or other political subdivision of the state.” (Emphasis supplied.) OCGA § 50-14-1 (a) (1) (A), (C).[7] Miller contends that district attorneys’ offices are offices as used in the ORA. For the following reasons, we agree. “Office” itself is not defined in the ORA or the OMA; therefore, we must turn to the principles of statutory construction to discern its meaning. As we have explained, “[w]hen we consider the meaning of a statute, we must presume that the General Assembly meant what it said and said what it meant.” Deal v. Coleman, 294 Ga. 170, 172 (1) (a) (751 SE2d 337) (2013) (citation and punctuation omitted). And “[a]s in all cases of statutory construction, we remain mindful that we must give the text its plain and ordinary meaning, view it in the context in which it appears, and read it in its most natural and reasonable way.” State v. Cook, 317 Ga. 659, 660 (1) (893 SE2d 670) (2023) (citation and punctuation omitted). We determine the ordinary public meaning of legal text by considering the meaning the text had at the time it was enacted. See Seals v. State, 311 Ga. 739, 740 (1) (860 SE2d 419) (2021), disapproved of on other grounds by Gonzales v. State, 315 Ga. 661 (884 SE2d 339) (2023). Dictionaries are often helpful “[i]n ascertaining the ordinary meaning of a word that is not defined in a statute,” but they “cannot be the definitive source of ordinary meaning in questions of textual interpretation because they are acontextual, and context is a critical determinant of meaning.” McBrayer v. Scarbrough, 317 Ga. 387, 394 (2) (d) (893 SE2d 660) (2023) (citation and punctuation omitted). City of Winder v. Barrow County, 318 Ga. 550, 555 (1) (899 SE2d 157) (2024). See also Integon Indem. Corp. v. Canal Ins. Co., 256 Ga. 692, 693 (353 SE2d 186) (1987) (“Statutes should be read according to the natural and most obvious import of the language, without resorting to subtle and forced constructions, for the purpose of either limiting or extending their operation.”). Dictionary definitions of “office” include a position of trust, a political subdivision or subunit of government, or a physical space where business is conducted or services are provided, and the meaning to be ascribed to the word largely depends on its context.[8] In the ORA, the term “office” is listed alongside terms like “department,” “agency,” “board,” and “bureau” – terms that describe specific types of governmental subunits.[9] Applying the canon of noscitur a sociis[10] the word “office” should be understood in relation to the other words listed in the statutory provision, because “words, like people, are judged by the company they keep.” (Citation and punctuation omitted.) Warren v. State, 294 Ga. 589, 590-591 (1) (755 SE2d 171) (2014). This is not to say that “office” necessarily means any and every subunit of state government. Indeed, such a reading would make surplusage of most every other term in the definition of “agency,” each of which describe specific kinds of governmental subunits, and we generally read statutes in a way that gives meaning to each term and avoids surplusage. See Lucas v. Beckman Coulter, Inc., 303 Ga. 261, 263 (811 SE2d 369) (2018) (“In interpreting a statute, we apply the fundamental rules of statutory construction that require us to construe the statute according to its own terms, to give words their plain and ordinary meaning, and to avoid a construction that makes some language mere surplusage.” (citation omitted)). In this case, though, we need not determine the outer bounds of the term “office” as used in the ORA to resolve the question whether district attorneys’ offices are covered by the ORA because the General Assembly has largely resolved that question for us. In numerous other provisions of the Code, the General Assembly – which we presume to enact laws with knowledge of preexisting law, including the definition of “agency” in the ORA – has both expressly recognized the existence of a “district attorney’s office” and assigned that office various powers and obligations under the law. [11] Thus, a district attorney’s office is not only a subunit of state government, it is a distinct legal entity recognized by law and specifically described by the legislature as an “office.” Whatever the outer bounds of the term “office” as used in the ORA may be, a district attorney’s office fits within those bounds. Therefore, because the Office of the District Attorney for the Western Judicial Circuit satisfies the ORA’s definition of “agency,” the District Attorney’s Office is subject to the ORA. See OCGA § 50-14-1 (a) (1) (A). Gonzalez contends, however, that the ORA applies only to offices within the executive branch of government, relying on two decisions handed down from this Court in the 1970s, Harrison Co. v. Code Revision Comm., 244 Ga. 325 (260 SE2d 30) (1979), and Coggin v. Davey, 233 Ga. 407 (211 SE2d 708) (1975). Based on these cases, she argues in part and as a matter of separation of powers, that the ORA does not apply to agencies that exist within the judicial branch of government. Gonzalez misconstrues this Court’s case law. In Coggin, we held that, although the predecessor to the OMA “is applicable to the departments, agencies, boards, bureaus, etc. of this state and its political subdivisions [,] [i]t is not applicable to the General Assembly” as a matter of statutory construction because the definition of “agency” did not include any term that could be construed to include the General Assembly. 233 Ga. at 411 (II). In Harrison Co., which involved a dispute concerning a state contract, we discussed a rule of statutory construction, now codified at OCGA § 1-3-8,[12] explaining that “the state is not subject to a law unless named therein or the intent that it be included be clear and unmistakable.” Harrison Co,, 244 Ga. at 328 (1). Neither of these cases included a holding on the issue of separation of powers and neither supports an argument that district attorney’s offices are not subject to the ORA. Moreover, Gonzalez’s argument fundamentally misunderstands Georgia’s separation-of-powers doctrine. The Constitution of the State of Georgia provides: The legislative, judicial, and executive powers shall forever remain separate and distinct; and no person discharging the duties of one shall at the same time exercise the functions of either of the others except as herein provided. Ga. Const. of 1983, Art. I, Sec. II, Par. III (emphasis supplied). This constitutional provision calls for the separation of powers, not the separation of branches or departments of government. Moreover, the separation-of-powers doctrine does not apply when another provision of the constitution specifically allows for the simultaneous exercise of different governmental powers. Thus, the separation-of- powers doctrine does not prohibit an agency or constitutional officer located within one branch of government from exercising powers exercised by agencies or officers located in a different branch of government if the constitution expressly grants such power. See In re Pending Cases, Augusta Judicial Circuit, 234 Ga. 264, 266 (215 SE2d 473) (1975) (“The three departments of government are not kept wholly separate in the Georgia Constitution.”). An instructive example of this concerns the constitutional powers granted to the Lieutenant Governor. Our state constitution provides that the Lieutenant Governor exercises both Article v. executive power and Article III legislative power.[13] See Ga. Const. of 1983, Art. V, Sec. I, Par. III (“The Lieutenant Governor shall be the President of the Senate and shall have such executive duties as prescribed by the Governor and as may be prescribed by law not inconsistent with the powers of the Governor or other provisions of this Constitution.”); Ga. Const. of 1983, Art. III, Sec. III, Par. I (a) (“The presiding officer of the Senate shall be styled the President of the Senate.”). This arrangement does not violate the constitutional separation-of- powers doctrine because our constitution expressly permits the Lieutenant Governor to exercise both legislative and executive powers. In a similar vein, our state constitution creates district attorneys in Article VI, pertaining to the judicial branch of government, yet it vests district attorneys with executive power: It shall be the duty of the district attorney to represent the state in all criminal cases in the superior court of such district attorney’s circuit and in all cases appealed from the superior court and the juvenile courts of that circuit to the Supreme Court and the Court of Appeals and to perform such other duties as shall be required by law. See Ga. Const. of 1983, Art. VI, Sec. XIII, Par. I (d). Although the constitution does not expressly state that district attorneys exercise executive power, that conclusion is inescapable for the following reasons. First, judicial and legislative powers are expressly reserved to other governmental entities. The constitution provides that “[t]he judicial power of the state shall be vested exclusively in the following classes of courts: magistrate courts, probate courts, juvenile courts, state courts, superior courts, state-wide business court, Court of Appeals, and Supreme Court.” Ga. Const. of 1983 Art. VI, Sec. I, Par. I (emphasis added). Both by its express terms and by its context, the vesting of the judicial power “exclusively” in the classes of courts excludes the possibility that district attorneys are vested with judicial power.[14] Similarly, the legislative power is vested in the General Assembly. See Ga. Const. of 1983 Art. III, Sec. I, Par. I (“The legislative power of the state shall be vested in a General Assembly which shall consist of a Senate and a House of Representatives.”). All that remains for district attorneys, then, is executive power. Second, the nature of the power exercised by district attorneys is neither legislative because district attorneys do not make the law, nor is it judicial, because district attorneys have no power to decide cases. See, e.g., Sons of Confederate Veterans, 315 Ga. at 50 (2) (b) (“The judicial power is that which declares what law is[] and applies it to past transactions and existing cases; it expounds and judicially administers the law; it interprets and enforces the law in a case in litigation.”) (citation and punctuation omitted)); Harbuck v. State, 280 Ga. 775, 778 (631 SE2d 351) (2006) (“The legislative branch enacts the law, the judiciary interprets those laws and the executive branch enforces those laws until they are amended or held to be unconstitutional.” (citation omitted)); City of Guyton v. Barrow, 305 Ga. 799 (828 SE2d 366) (2019) (“At the core of the judicial power is the authority and responsibility to interpret legal text.”) Rather, district attorneys exercise executive power because their function is to enforce the law by prosecuting criminal cases. See Ga. Dept. of Human Svcs. v. Steiner, 303 Ga. 890, 904 (V) (815 SE2d 883) (2018) (agencies that enforce laws exercise executive power). Thus, we reject Gonzalez’s argument that the ORA does not apply to her office simply because our state constitution provides for district attorneys in Article VI.[15] (b) Gonzalez is subject to suit under the ORA in her official capacity as the custodian of public records for her office. Miller sued Gonzalez in her official capacity as district attorney and as custodian of records for the ORA. Gonzalez does not argue, in responding to Miller’s ORA requests, that she was acting as anything other than the custodian of her office’s public records.[16] An action “to enforce compliance with the provisions of’ the ORA may be brought “against persons or agencies having custody of records open to the public.” OCGA § 50-18-73 (a) (emphasis supplied.) Thus, under the plain language of the ORA, Gonzalez may be sued in her official capacity as custodian of her office’s public records.[17] 4. Immunity. Gonzalez argues that she has absolute prosecutorial immunity from civil liability for private actions arising from the performance of her official duties as District Attorney, including actions taken pursuant to the ORA. Although Gonzalez correctly asserts that Miller’s claims in this enforcement action “necessarily relate directly to the District Attorney’s activities in her official capacity,” prosecutorial immunity does not bar Miller’s claims against Gonzalez in her official capacity because official- capacity claims are claims against the agency, and the agency’s sovereign immunity has been waived by the ORA. As explained below, a district attorney’s prosecutorial immunity applies only to individual-capacity claims.[18] With respect to Miller’s official-capacity claims against Gonzalez, those claims are deemed to be claims against the district attorney’s office, an agency of state government under the ORA, and not claims against Gonzalez personally. As we explained in Lathrop v. Deal, “a suit against a state officer in his [or her] official capacity amounts to a suit against the State itself, and the doctrine of sovereign immunity bars suits against the State to which the State has not consented.” 301 Ga. 408, 425 (III) (801 SE2d 867) (2017) (citation omitted). See also Ga. Dept. of Natural Resources v. Center for a Sustainable Coast, 294 Ga. 593, 599 n.4 (755 SE2d 184) (2014) (“Sovereign immunity applies to public employees sued in their official capacities because these are in reality suits against the state.” (citation and punctuation omitted)). Sovereign immunity, however, can be waived.[19] And in this case, the ORA waives a state agency’s sovereign immunity by expressly providing that “any person, firm, corporation, or other entity” may bring an action in the superior court “against persons or agencies having custody of records open to the public under this article to enforce compliance with the provisions of this article.” See OCGA 50-18-73 (a). Thus, Miller’s claims against Gonzalez in her official capacity are not barred by sovereign immunity because sovereign immunity has been waived by the ORA. And Miller’s official-capacity claims are not barred by prosecutorial immunity because those claims are not actually claims against Gonzalez. Prosecutorial immunity may apply, however, to Miller’s individual-capacity claims. An individual’s immunity from suit is a defense to an individual-capacity claim. See, e.g., Kentucky v. Graham, 473 U.S. 159, 167 (105 SCt. 3099, 87 LE2d 114) (1985) (“The only immunities that can be claimed in an official-capacity action are forms of sovereign immunity that the entity, qua entity, may possess[.]“); Roach v. Stouffer, 560 F.3d 860, 870 (8th Cir. 2009) (“immunity, either absolute or qualified, is a personal defense that is available only when officials are sued in their individual capacities”) (citation and punctuation omitted). This is because “[s]overeign immunity and official immunity are distinct doctrines.” State of Ga. v. International Indemnity Co., 305 Ga. 126, 131 (2) (a) (823 SE2d 806) (2019). “[I]t is well settled that sovereign immunity shields from suit the State and its departments and agencies, including claims against the State’s officers or employees in their official capacity, while official immunity “offers public officers and employees limited protection from suit in their personal capacity.” Id. (citations and punctuation omitted; emphasis supplied). Similarly, prosecutorial immunity, another kind of official immunity, shields the person – not the state – from suit. The Georgia Constitution provides that “[d]istrict attorneys shall enjoy immunity from private suit for actions arising from the performance of their duties[,]” Ga. Const. of 1983, Art. VI, Sec. VIII, Par. I (e). This constitutional immunity is available as a defense against Miller’s individual-capacity claims to the extent that those claims pertain to actions arising from the performance of Gonzalez’s duties as district attorney.[20] In this case, however, the trial court did not address whether prosecutorial immunity barred any of Miller’s individual-capacity claims against Gonzalez, nor has Gonzalez made any argument on appeal with respect to those claims. Therefore, we do not address the merits of those individual-capacity claims nor do we express any opinion as to their viability. Judgment affirmed. All the Justices concur.