In the movie Knives Out (2019), the villain is brought to justice by his testimony recorded secretly on the detective's phone. The Fifth Amendment protects people from self-incrimination, so would this evidence be usable in court to convict the criminal?
No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a grand jury, except in cases arising in the land or naval forces, or in the militia, when in actual service in time of war or public danger; nor shall any person be subject for the same offense to be twice put in jeopardy of life or limb; nor shall be compelled in any criminal case to be a witness against himself, nor be deprived of life, liberty, or property, without due process of law; nor shall private property be taken for public use, without just compensation.
There is nothing in there about recordings at all, obviously, but a recording is not the person being FORCED to testify against themselves.
As to whether a recording can be used as evidence, US law differs across the states. Consent of recording is required by one/both/all parties depending on the state. If single party consent is required then it's legal evidence AFAIK. This has nothing to do with the 5th amendment.
Eleven states require the consent of every party to a phone call or conversation in order to make the recording lawful. These "two-party consent" laws have been adopted in California, Connecticut, Florida, Illinois, Maryland, Massachusetts, Montana, New Hampshire, Pennsylvania and Washington. (Notes: (1) Illinois' two-party consent statute was held unconstitutional in 2014; (2) Hawai'i is in general a one-party state, but requires two-party consent if the recording device is installed in a private place; (3) Massachusetts bans "secret" recordings rather than requiring explicit consent from all parties.). Although they are referred to as "two-party consent" laws, consent must be obtained from every party to a phone call or conversation if it involves more than two people. In some of these states, it might be enough if all parties to the call or conversation know that you are recording and proceed with the communication anyway, even if they do not voice explicit consent. See the State Law: Recording section of this legal guide for information on specific states' wiretapping laws.