Chosen Solution

My current RAM is two 4 GB modules (2x4) by default - total of 8 GB I bought the same frequency two 8 GB modules (2x8) PC4-2400 to get the total of 24 GB Now its not powering up. If I removed one of them, and leave 3 modules it’s OK, but I only get to 20GB. If I add the last 4 GB module it will not power up. Any Idea or solution for this?

You need to wait a bit for the system to initialize the RAM as you’ve altered it “Your iMac performs a memory initialization procedure when you first turn it on after upgrading memory or rearranging DIMMs. This process can take 30 seconds or more, and the display of your iMac remains dark until it’s finished. Make sure to let the memory initialization complete.” Installing memory in 2017 iMac. Have you tried moving the modules around? You might have a bad module slot. Just using the two 8 GB modules place them at the top slots. Reference: Apple - Install memory in an iMac guide