While its not perfectly divided this way, it's worth noting that the US has different things called “jails” and “prisons” and that the former are mostly for pretrial and short-sentence incarceration and mostly run by local governments, while the latter in state systems are almost exclusively for post-conviction felony sentences, while they are used for all purposes in the federal system.
This is important, because while the number of pre-trial confinements in the US is way too high, if you fail to understand that distinction statistics about the proportion of jail inmates that are on pre-trial confinement may be grossly misleading.
There is a graphic overview of the whole detention picture here: https://www.prisonpolicy.org/reports/pie2020.html