Ignoring the question of whether Trump violated US law by being in possession of some document (without concrete details, this cannot be assessed), we can consider what the "laws" are regarding classification of documents and consequences of violating those laws.
"Classifying" information takes place within the executive branch – Congress and the courts do not classify documents. 18 USC § 798(b) defines "classified information" as something "specifically designated by a United States Government Agency for limited or restricted dissemination or distribution", and "unauthorized person"
means any person who, or agency which, is not authorized to receive
information of the categories set forth in subsection (a) of this
section, by the President, or by the head of a department or agency of
the United States Government which is expressly designated by the
President to engage in communication intelligence activities for the
United States
18 USC 798 makes it a crime to "knowingly and willfully communicates, furnishes, transmits, or otherwise makes available to an unauthorized person" of any classified information. The logic of the classification system depends on someone being always authorized to see and evaluate information in order to deem is "classified" in some sense – POTUS is universally authorized.
There is a regulation that pertains to former presidents,
one promulgated by Treasury, saying that
Access to classified information may be granted only to individuals
who have a need-to-know the information. This requirement may be
waived, however, for individuals who:...Served as President or Vice
President.
Note that this addresses (and was device with the intent that) a former president could access classified information which was not in their possession ("access"), and does not bear on the question of whether a current POTUS can legally retain documents which he classified.
There is a separate "whoever" law, 18 USC 793, which says that
Whoever, for the purpose of obtaining information respecting the
national defense with intent or reason to believe that the information
is to be used to the injury of the United States, or to the advantage
of any foreign nation...
does typical spy things like breaking into military facilities, but that isn't relevant to POTUS retaining classified documents.
Anyhow, if other people, who are unauthorized to receive such documents, come to possess them, then there could be consequences. But criminal sanctions under §793 involve (1) illegally entering military / intelligence facilities or (2) authorized persons transmitting such data lawfully in their possession to unauthorized persons. Up to 10 years in prison is the penalty, plus fines.
Here is the currently-visible version of the warrant petition. As you can see, the main allegation is violation is a presidential records retention law (POTUS has to leave his records behind).