Just adding additional information for those that haven't heard or seen yet, the engine oil is a likely culprit and should be changed to what Volvo has recommended all along in their owners manuals for "extreme conditions", the RBS0-2AE/SAE 0W20 synthetic oil. Why a thinner oil is recommended for extreme conditions, I don't know as that's different than one would expect, but there's definitely something about it that helps prevent these Low Speed Pre-Ignition occurrences(LSPI). The LSPI is what's causing these knocking noise, it's what is causing the engine to see an abnormal combustion event/Knock and reduce power momentarily as it's potentially hurting itself.
The spark plug change seen earlier on was to spark plug design with less porcelain in the combustion chamber to reduce the possibility of it being broken. This was happening with the earlier designs and potentially causing internal engine damage during instances of LSPI.
This lighter oil likely is reducing the oil vapor that gets consumed or is less ignitable, as oil in the combustion chamber increases the possibility of knocking(it effectively reduces the octane level of your fuel). Those of you who'd like to run 87 octane fuel, likely still can with the new oil, but I will continue to recommend premium because I want my and my customer's engines to last as long as possible with the best possible performance at all times.
In any case, Volvo has finally put out a tech bulletin(TJ34740.3.4) in 4/2020 saying that any car that has had the 2015+ Drive-E/VEP 4 cylinder engine repaired or replaced MUST use the Castrol Edge Professional V 0W-20 synthetic oil. They also say that it's acceptable to use this oil on ALL of these engines, regardless if they've been repaired in the past or not.
All 2021+ cars now ONLY show the RBS0-2AE/SAE 0W20 synthetic oil as being allowed in these engines. They no longer show the A5/B5 5W30 specification oil that was previously considered the "normal" oil for these engines.
If you're having this problem, switch oil, now. It could save your engine, and will give you more power and efficiency if you're experiencing the knocking/clicking sound often.