It depends.
If what you need to implement have a custom forward where it requires some logic (if/else, etc) go the module way.
otherwise If for example all you need to do is to tie together some layers in seccession, (create some blocks like conv, bn, activation , etc) you can use functions as well and return a modulelist, nn.Sequential, etc and use that.