I support thousands of Macs for our organization. I have been finding that the 2018+ Macs seem to have a much higher rate of Logic Board failures and it is starting to concern me. We've had to replace at least three iMac 2019 Logic Board several months ago...the failures occurred close together.
I think it has a lot to do with the T2 security chip since they make things so much more difficult (even the 2016 & 2017 Macs with T1 chips have more issues than older models). Part of it is due to the Logic Board now containing so much more integrated onto them like SSD, memory, GPU, WiFi, etc. Unfortunately when many of these 2018+ Macs fail there is no way to even know which component on the Logic Board is bad because anything you want to do requires authenticating with the T2 security chip. The T2 security chip causes me no end of headaches while supporting our organization's Macs. These 2018+ Macs are just glorified iPads without a touchscreen.
There is nothing you could have done to prevent the issue. Just use the iMac as you wish.
I'm glad Apple is going to replace the MLB for free for you.
Thanks for the follow up to confirm as it helps us and it will help others who find your thread.