This was recently asked elsewhere, and that IDE doesn't work very well if at all on any recent macOS, and macOS support appears to have been withdrawn.
Among other discussions: https://discussions.apple.com/thread/253619481
Your choices here are to use Xcode and not the Code::Blocks as your IDE (which'll mean less or no support from the instructor), or boot and use Windows or another supported platform directly or as a guest and use Code::Blocks, or re-port and support Code::Blocks to macOS—that you found something that ~works may or may not be helpful, if there are issues found later.
As for the H file with Xcode, add it to the project. Create a new file, of type C header file, and populate the header file accordingly. File > New > select macOS > C Header File. To reference a project local header file in C or C++, use double quotes around the filename, and not angle brackets.
Here's a screenshot of the Xcode IDE just having added a bogus header file to another C++ example I've posted elsewhere, with the include visible in the project to the left column and with the #include highlighted in the displayed C++ source. (There's nothing in BogoHeader.h here, but it compiles.)
There are various other Code::Blocks discussions around, but it's probably best to ask those questions over in the Code::Blocks forum.