Actually, 'n' or 'ng' or even 'm' doesn't matter for native Japanese speakers. They are all written as ん'n', and we don't care about the pronunciation difference.
However, if you do care, there is some tendency:
ん followed by 'g' or 'k' is often pronounced as 'ng.' Like まんが、さんがい。
ん followed by 'm' 'p' or 'b' is often pronounced as 'm.' Like さんぽ、さんまい、さんばい。
ん followed by 'n' 't' 'd' 's' or 'z' is often pronounced as 'n.' Like おんな、さんさい、さんにん、サンダル。
Note that this is not a "rule." You can pronounce ん just as you find easy. Rather than that, be careful not to link to the following vowel when ん is followed by a vowel.
れんあい is 'RE-N(g)-A-I,' not 'Re-N-Na-I.'
...อ่านเพิ่มเติม