When I group my mainmatter to prevent it of inserting a blank page, my chapter numbering dissapears as well.
I can't seem to find any work-around or even why this is happening.
\documentclass[a4paper,10pt,twoside,twocolumn,openany]{book}
\usepackage{lipsum}
\begin{document}
\frontmatter
\tableofcontents
{
\renewcommand{\cleardoublepage}{\newpage}
\mainmatter
}
\chapter{Two columns}
\lipsum[1-5]
\chapter{Two columns again, but it's not}
\lipsum[1-5]
\end{document}
The moment I remove the curly braces, it starts working again.

\renewcommandand whatever\mainmatterdoes. What is it that you actually want to achieve? – Werner Dec 14 '21 at 23:41I followed the instructions of the linked answer.
When looking at the document classes, I think 'report' fits better for my use case, as it does not have the frontmatter, mainmatter and backmatter
– Mathieu Dec 14 '21 at 23:55