\usepackage{tcolorbox}
\usepackage{amsthm,amsmath,amssymb,mathtools}
\newtheorem{theorem}{Theorem}
.
.
.
\newcommand{\nwtherm}[#1]{
\begin{tcolorbox}[colback=yellow!05!white,colframe=yellow!10!black,width=\linewidth,before skip=1mm]
\begin{theorem}
#1
\end{theorem}
\end{tcolorbox}
}
.
.
.
Illegal parameter number in definition of \reserved@a.
./preamble.tex, 43
<to be read again>
1
l.43 \newcommand{\nwtherm}[#1]
{
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
Illegal parameter number in definition of \reserved@b.
./preamble.tex, 43
<to be read again>
1
l.43 \newcommand{\nwtherm}[#1]
{
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
Missing number, treated as zero.
./preamble.tex, 49
<to be read again>
##
l.49 }
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
Parameters must be numbered consecutively.
./preamble.tex, 49
<to be read again>
1
l.49 }
I've inserted the digit you should have used after the #.
Type `1' to delete what you did use.
Parameters must be numbered consecutively.
./preamble.tex, 49
<to be read again>
2
l.49 }
I've inserted the digit you should have used after the #.
Type `1' to delete what you did use.
Runaway argument?
./main.tex, 1
##2##3##4##5##6##7##8##9##0##1{ \begin {tcolorbox}[colback=yellow!05!\ETC.
! File ended while scanning use of \reserved@a.
<inserted text>
\par
l.1 \input{preamble}
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
Undefined control sequence.
./name.tex, 13
The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.
Learn more
l.13 \nwtherm
{theorem number 1}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Text Formatting ⇒ Why won't this run, (new command -> tcolorbox+theorem)
Why won't this run, (new command -> tcolorbox+theorem)
Please create a complete
minimal working example and mark its code so that it can be tested using the online compiler.
Read in
By the way,
mathtools loads
amsmath.

Read in
\newcommand
and \renewcommand
or an introduction to LaTeX (e.g. learnlatex.org) how to specify the number of arguments when defining a command.By the way,

