The Medal of Freedom was created in 1963 by then-president John F Kennedy to honor civilians who’ve made contributions to the “interests of the United States,” “world peace” or other cultural or “significant public or private endeavors.”
The presidential unilaterally decides who gets it, though they can do so on recommendation of a committee established for determining recipients.
The Medal of Honor is far older and traces its roots to 1861 during the American Civil War. It has been awarded to 3,519 people, and earning it in the modern military requires a service member to distinguish himself “conspicuously by gallantry and intrepidity at the risk of his life above and beyond the call of duty” during active combat against a foreign adversary.
Nominees must have their actions documented by multiple witnesses and approved by their chain of command, with final approval from the president. Many of the service members who’ve received it in the years since the end of the Second World War have been decorated posthumously, though there are current 60 living recipients of the medal