Trump blabbed about the search of Mar a Lago to try to get out in front of the story.
However, by doing so, he gave the DOJ a justification for unsealing the search warrant.
Had Trump kept his yap shut, the warrant would have remained sealed for at least the foreseeable future.