“-Nya” is a third person personal pronouns. It can be added to certain types of words to turn them into nouns. It can be added to adjectives.
Kota itu kecil. Mereka heran melihat kecilNYA kota itu.
That town is small. They were surprised to see the smallness of the town.
If the adjective is in a group of words, you can add ‘nya’ to the group. So e.g.:
Kota itu masih kecil. Mereka heran melihat masih kecilNYA kota itu.
That town is still small. They were surprised to see that the town is still small.
(literally: ‘THE still-small[ness]’ of the town)
‘Nya’can also be added to intransitive verbs.
Ada tas di WC. AdaNYA sebuah tas di WC membuat satpam curiga.
There was a bag in the toilets. The presence of a bag in the toilets made the security guard suspicious.
(literally: ‘THE there-was[ness]’ of a bag)
Or, if the verb in is a group of words, you can add ‘nya’ to the group:
Tidak ada bantuan. Kami kecewa dengan tidak adaNYA bantuan.
There isn’t any help. We were disappointed by the lack of help. (literally: ‘THE ‘there-isn’t[ness]’ of help)
“Nya” can also be added to transitive verbs which are in their “di-” or “ter-” form.
Rp 1 miliar ditemukan. Polisi mengumumkan ditemukanNYA Rp 1 miliar.
A billion rupiah were found. Police announced the discovery of a billion rupiah.
(literally: THE ‘were-found[ness]’ of a billion rupiah)
Kapal itu belum ditemukan. Belum ditemukanNYA kapal itu sulit dipahami.
The ship hasn’t yet been found. The fact that the ship hasn’t been found yet is hard to understand.
(literally: THE ‘hasn’t-yet-been-found[ness]’ of the ship)
Wartawan itu terbunuh. Kasus terbunuhNYA wartawan itu sudah terkenal.
That journalist was killed. The case of the killing of that journalist is well-known.
(literally:. THE ‘was-killed[ness]’ of that journalist)
Notice that ‘nya’, to make nouns, is used for particular, concrete instances. When talking about general ideas with no specific reference, we need to find another way express our idea. So:
Bu Titi menyesalkan dijualNYA mobil mereka oleh suaminya.
Bu Titi regretted the selling of their car by her husband. [=a particular, concrete instance of selling.]
Bu Titi minta nasihat tentang penjualan mobil bekas.(not “dijualNYA”).
Bu Titi asked for advice about the selling of second-hand cars. [= selling in general; not any particular instances of it.]
Reference: Dr. Timothy Hassall, Indonesian Grammar, ANU – Canberra.