I have the exact same problem in Outlook 2021 and can only imagine that this is a general issue with Outlook. The warning message appears before certain attachments such as PDF files can be opened. There is specifically a tick box to disable the warning but this is grayed out. If I close Outlook and open Outlook as an administrator I can then untick the "Always ask before opening this type of file" box and the prompt no longer appears. Unfortunately this is not permanent and after a week or so the prompt returns and as before, the option to untick the "Always ask..." box is grayed out. Like others, I suspect that it is an update which resets the prompt.
What I would like to know is, why is the option to disable this warning, grayed out in the first place. What is the point in having the option if the only way you can use it is to run the program as Administrator. I am the admin of my own computer so why do I specifically have to do this. It doesn't make any sense to me.
At the very least if we do go to the trouble of unticking the box, it should stay like that and not keep coming back. Can Microsoft release an update to fix this behaviour please?