You need to take a course on basic css and html so that you understand how css works and interacts with the html. It looks as though you have copied and pasted the code in your codepen as that uses some of the latest css features such as grid. There are many courses and tutorials about (some on Sitepoint) so I'm not going to google them for you
Without at least a basic understanding of how CSS works you will not achieve the modularity you are looking for. You can't really just copy blocks of code that contain positional information unless you are reproducing the exact same structure somewhere else and you copy the exact html that makes the original work.
You can create re-usable elements but generally that would be simple things like borders, colors padding and some fluid positioning within that context. Due to the Cascade (CSS) you can't actually drop code into different contexts easily because the element will inherit certain styles from the new context that may be different from its original position.
There are some advance CSS properties on the horizon that will allow more modularity to avoid cascade issues but not yet ready for prime time. However, for most normal web use you don't really need to go to those lengths if you have control over the whole page and create pages sensibly. (Third party plugins obviously could do with being isolated from inheritance but generally it is not a problem on most general sites).
For something like the blue box you show in your side-menu then you could make that mostly re-usable and copy and paste. However you would only copy the menuitem and not the whole aside code as that is too specific.
For re-usable elements you do not want to tie them to specific locations. e.g. you have the menuitem code only available inside the aside class.
That immediately makes it unusable anywhere else unless you also copy all the aside divs with it and then you are into a different structure as the aside class has a grid structure that obviously only works for the side column. You should have created the class like so instead.
box-shadow: inset 7px 0px 1px 0px green;
Now you can just copy the menuItem div and re-use it elsewhere with minimum effort (bearing in mind any cascading or inheritance issues already mentioned).
Hope that helps