Try creating a new user with administrator privileges on the the Mac Mini. This is done in Users&Groups on the Mac. Copy any data files you may need to an external drive. Note: You do not need to do anything with applications as they will be available to the new user.
Then reboot the Mini and log into the new user. Once in the new user, log into your AppleID. This will give you the two factor authorization because it is obviously a new user. Copy the previously saved files into the new users account. Continue using this new user on the Mac and see if the issue continues.
It is possible the there is something corrupted in the current user on the MacMini that is triggering the two factor/trust issue.
I have seen similar issues related to user accounts on a Mac in the past.