It will take up more memory, yes. To store a variable in your computers memory you need to allocate more memory depending on how big it is. This is why in other programming languages that are lower level like rust, C#, C++, etc, they have specific types for different purposes.
For example i32 in a low level language like rust means that your computer it taking up 32 bits for that variable. While i8 means 8 bits and so on.
Low level just means no garbage collector, you manage the memory yourself, you have access to such things like that, even though Luau is high memory it does not mean that bigger variables don’t take up more memory, because it still happens. It is just how computers work in general.
The bigger the variable, or more things the variable stores, the more memory the computer is going to reserve for said variable in order to store all that data.
In summary, essentially the bigger the table, the more variables, unused, and what not, the more memory will be used. By having a module full of services that are required by various scripts, some of them will be unused per script that requires them, this now wastes more memory because you should and can just get rid of those variables as it is a variable/value/etc that will take up memory, and if it’s unused it should be deleted.
I mean if you really want to do this, I don’t think the performance is that big of a deal to hurt anyone, but people will 100% complain about it if they see it, as if it’s a better way to optimize your code in general, and doing practices that are save more memory are obviously better in general no matter how little, but it probably won’t be like saving 100 MB of memory.
Also one more thing, as your game grows this will probably matter since you’re gonna have multiple scripts requiring this module. If the module isn’t even being called more than once, why have it, it is more efficient to for one have all of the used variables in one script, as well as no need or hassle to index a module for a variable. As you could just have your variables be in the whole scope of the script, and you would just type out the name to reference them.