So the letter yaa is pronounced as an alif when there is a small alif on top. However, when do we know when we should use this type of yaa or just the letter alif when we want to make the alif-sound?
Wa alikom asslam,
The lesson in which I explained this topic dealt mainly with reading it properly from the Quran, which is why you will have that sign to make it easier for you in shaa Allah.
However, if you are asking about the rule why this happens. There isn’t really any rule to it, it is just that some words are written this way, and pronounced in this way, but there is no rule to govern this issue.
So the word هدى is pronounced with an alif at the end of it, and it is written like that, not like this هدا.
I hope I understood your question properly, and that you got the answer you were looking for. If not, let me know
Allah knows best.