The Constitution does not require a 23-member grand jury; it does not specify a size:
No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a Grand Jury, ...
If there is a constitutional minimum, it is not apparent from the text, and I am not familiar with any judicial pronouncement on this issue.
The Federal Rules of Criminal Procedure allow for grand juries of 16 to 23.
ohwilleke's answer presents a brief history of grand jury composition and explains why 23 makes practical sense.
The United States Supreme Court has held that the grand jury requirement is not incorporated against the states: Hurtado v. California, 110 U.S. 516 (1884). Therefore, the procedure for indictment in state courts, including grand juries if they are used, is a matter of state law.