<p>I have 12 parts for a model I want to print but I would like to know if I can put all of them in a single G-code file and print that on its own. Would this affect the model in any way?</p>
<p>I’m using PLA on my Ender 3 Pro</p>

This answer assumes FDM printing -- for resin printers, as I understand it, as long as there's flow space between parts, if they fit on the build plate, they'll print.
For FDM, generally, you'll get better print quality printing a single part, because layers don't cool while you print the same layer for each of the other parts (meaning layer adhesion will be better).  That said, if the parts are very small, this additional cooling may be an improvement vs. having to set your slicer to provide a pause between layers to avoid slumps and layer spreading.
A compromise, if the parts are low enough, is that most slicers can be instructed to print the parts sequentially -- that is, print all of part A, then all of part B, and so forth.  This has some limitation in that all parts already printed must clear parts of the machine, and may also require larger clearance between parts for items like fan shrouds.
But printing a bunch of parts at one time does work, if the compromises in layer adhesion and other quality issues related to traveling between parts are acceptable.  The only way to be sure is to print the whole lot (perhaps with a large nozzle and thick layers, low infill, etc. to minimize filament consumption and print time) and see if they're good enough.