El Acta de La Independencia de Centroamerica was the document that declared the independence of the (then) 5 countries of Central America- Guatemala, El Salvador, Honduras, Nicaragua, and Costa Rica. Belize and Panama were established later.
It was signed and enacted on September 15, 1821.
Actually, at the time it was called the Independencia de Guatemala, as all of the Central American countries were considered provinces of the the Spanish territory of Guatemala. In the same year the new Central American states chose to join the Mexican Empire, but the alliance fell apart within a few years, leading to an independent Federation of the Centre of America in 1823.
The events surrounding these political movements are complicated and sprawl throughout multiple decades. I’m no expert, rather someone continuing to better understand the histories of Mexico, the Southwest US, Central America, South America, The Caribbean, and the other regions of what is sometimes called Latin America, or América Latina.