I'm just starting out , again. And I'm learning on c++ 23. Using mingw64.14.1. It does support modules but I do not yet know how to precompile the module using codeblocks, yet. However using gcc is not difficult. Open a cmd in the folder of the project you are working on. Set the path for gcc , if you have not already done so. An example is "set PATH=C:\Program Files\CodeBlocks\mingw64.14.1\bin;%PATH". Run the following command: "g++ -std=c++2b -fmodules-ts -c -x c++ <filename.cppm>" . g++ runs gcc, -std=c++2b : tells gcc to use c++23 , -fmodules-ts tells the compiler you are using modules, -c - Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an object file for each source file., -x forces gcc to use the language specified , c++ , then filename.cppm or however you label module file extension. If successfully built you should see a new folder gcm.cache. And a new object , filename.o in the root folder of your project.
If you figure out how to simply use codeblocks , respond.