When was the Biblical canon formalised and finalised? 397, 419 or a different date?
Do different branches of Christianity state that the canon was formalised at different times?
Are there branches that have altered their canon in recent times?
This is tricky questions because there are some outliers, but I'll describe the broadly accepted tradition, excluding some smaller Christian groups.
As far as the New Testament, the 39th Festal Letter of Athanasius (AD 367) is the first complete list of the books broadly accepted in the New Testament by Christians (there are a few smaller groups who have slightly different lists). But there was wide agreement on most books well before this. The Four Gospels were settled and virtually unquestioned very early on (see C. E. Hill Who Chose the Gospels?), and the main corpus of Paul, quite possibly selected by Paul himself, was also widely accepted early on. There were some stragglers like Hebrews, Revelation, and 2 Peter that didn't receive wide acceptance until later and a few that were on the edges of acceptance like 1 Clement and the Shepherd of Hermas, but the list had settled down by the time of Athanasius's letter.
The generally received Old Testament canon has a little bit of extra flux concerning the Apocrypha, going back to the ancient Jews in Alexandria using it, having those books being appended to the Septuagint (ancient Greek translation of the OT), Jerome giving them the name Apocrypha, and the Council of Trent during the Reformation period declaring the books to be deuterocanonical (second canon) and the opposing Reformers saying the Apocrypha are useful to be read but not infallible or inspired. But otherwise, the OT is already set by the time of Jesus.