This is a common frustration and it almost always comes down to pressing the wrong option on the automated prompt.
Every inmate phone carrier runs an automated recording before connecting the call. That recording walks through several options, typically something along the lines of press one to accept, press two to hear rates, press five to block future calls, and similar choices depending on the carrier. The exact prompts and numbers vary between carriers, and pressing the wrong one, particularly a block or reject option, either drops the call or permanently blocks that number from reaching you.
If pressing five caused the call to disconnect, you likely hit a reject or block option rather than the accept option. Going forward, listen to the full recording before pressing anything. The accept option is usually the first or second prompt and is announced early in the recording. Do not press anything until you hear the word accept or connect clearly associated with a specific number.
If you accidentally blocked the number, that creates a separate problem. A block does not lift on its own. You will need to call the facility and ask to speak with a counselor, explain what happened, and request that the block be removed from your number. That is a manual override on the facility's end and requires staff intervention to fix.
Going forward, InmateAid's discount phone service eliminates some of this uncertainty by routing calls through a system you set up in advance with your number already confirmed as the destination. That does not remove the carrier's prompts entirely but it simplifies the setup considerably and reduces the chance of accidental blocks affecting your connection.