南無妙法蓮華經 ... or is the last kanji 経？ This is one example. In general, how do you select from kanji with the same reading and meaning when you write? Like these two kanji, I think both mean sutra and are read kyo. Of course, this is a set classic phrase, but there are many other examples. For example, my dictionary gives three kanji for “butsu” (meaning to hit, not 仏...)
There was a writing reform of Japanese kanji after WW2 which led to these differences. In a 経本【きょうほん】 (sutra book) you will find the kanji 經, but this is the 旧字体【きゅうじたい】 or 正字【せいじ】 of 経. In modern Japanese it's usually written with the 経.
This is one example. In general, how do you select from kanji with the same reading and meaning when you write?
Well, generally you would use the modern one.
For example, my dictionary gives three kanji for “butsu”
Usually if different kanji are used for the same word, the different kanji carry different meanings, so native speakers have to learn which one to use. In the case of butsu, looking at those kanji versions, I'm not sure what the difference between 打つ and 撃つ and 撲つ is, but generally reference books or even the henkan function on your computer will contain details. Incidentally I don't think I've seen any of them used, probably because 打つ and 撃つ are usually read うつ. ぶっ飛ばす or something is almost always with the ぶっ in kana I think.
(meaning to hit, not 仏...)
As it happens 仏 also has an old form 佛, and that will also be the one in the kyouhon (sutra book).