Samsung shared a list of phones and tablets with three years of support last year, all of which will definitely get Android 12:
- Galaxy S series:
- Galaxy Note series:
- Galaxy Foldable devices:
- Galaxy A series:
Samsung has released a few phones since then, but any future phones in the S, Note, or Z series are automatically included. It's more difficult to speculate about which pre-2020 phones will receive Android 12. Samsung previously said that "flagship models from the Galaxy S10 (Android 9) or later" are also eligible for three years of support, so the Galaxy S10 and Note10 series should also get Android 12.
As for when the above-mentioned devices will get Android 12, that's more difficult to answer. Samsung usually starts updating its flagship phones a few months after Google releases the upgrade, with tablets and budget phones coming later. For example, Google released Android 11 on September 8th last year, while rollouts to the Galaxy S20 and Note20 series didn't start until December (at least in the United States).