Hajj is only obligatory when one has means to do so. Those means include not only financial means but also non-financial means like health and physical capability etc. If one have these means then Hajj is obligatory on them and they will be held accountable if they do not perform Hajj; and if such means are not available then Hajj is not obligatory and the person will not be accountable.
A Muslim not performing Hajj during his lifetime despite having means will be considered to have not performed one obligatory ritual of Islam but he will not become a non-muslim/kafir because of it unless his intentions were to rebel against God, but this is something to be judged by God only. We as outsiders will consider that person a Muslim if he died claiming as such.
Please also refer to the following videos:
https://youtu.be/RDmgsH0Rs1U?si=osET7JRt3C49D_ug