What will happen if a 2 node replica set lose its primary?

Please read Formatting code and log snippets in posts and update your post accordingly so that we can understand what you shared. JSON is not readable when it is not indented correct.

If you know

why are you testing replica set with only 2 nodes since it is NOT RECOMMENDED configuration?

It makes me feel like you are planning to deploy something that is NOT RECOMMENDED and trying to see if you could cut corner and get away it.

Please explain the procedure you did to

In the second rs.status(), I was expecting en entry in the members array for the down node with a health value of 0. But I see only one entry.