good question! and not rudimentary at all! there's a lot of methods, and i've also changed my technique over time, so this actually makes me want to give you a BIG answer about it ^^
the tl;dr (putting this up top) is i use Clip Studio for my art and make heavy use of the "close gap" setting that can be found on fill and magic wand tools, which basically makes it do some kind of morphological closing or something similar on the reference layer first and then fills/selects from that, essentially ignoring small gaps
but even that has its downsides and quirks so nowadays i use this absolutely magical tool from the CSP asset store for 90% of my filling in
anyway here's a breakdown of everything i tried over the years and why it doesn't work
fill

simply using the fill tool (with close gap enabled here) will fill in the shape. however, if you zoom in (especially visible on the rightmost step where the lineart is made transparent) you can see white background pixels along the edge where it didn't fill in the anti-aliasing of the lineart
fill with area scaling

raising the "area scaling" slider to a value >0 will automatically expand the filled area by that amount, which will fill in the anti-aliasing. however this also causes the fill to "spill out of" the closed gaps and require a lot of cleanup
both of these are kinda bad. its sad that fill just doesn't work well if you have any sort of anti-aliasing or texture on your lineart. what i found works better is...
magic wand

for my older art (around the time of this one and older), i would use the magic wand method, which is
- magic wand select all the background outside the figure (less clicks than selecting all the inside of the figure)
- 1px gaps from the brush's jitter are ignored with close gap
- expand the selection a couple of pixels
- this moves the selection into/underneath the lineart of the figure
- invert the selection
- now the entire figure is selected, including a little bit underneath the lineart
- fill selection
- fix small mistakes that occurred from the expand selection (for example spikes will be rounded off and not fully filled in
now this is assuming your art program even HAS features like close gap and area scaling. if it doesn't... well... then your only REAL option is...
draw around the edges

in my later art since i got my tablet (for example this one) i switched to Infinite Painter for a while, and... IP does not have "close gap". it also does not have an actual(ly good) fill tool and it also doesn't have "area scaling"
because of this, i resorted to simply drawing around all the outer edges of the entire figure with a solid brush to make sure its fully enclosed, and then doing the magic wand method.... this is obviously a lot of work, but you have to make do with the tools you have ^^;
"close and fill tool without gaps"

i've since switched back to clip studio (android) because of the aforementioned issues with infinite painter and more
clip studio comes with a "close and fill" tool that doesnt actually work right. luckily, someone made a version that Just Works and put it on the asset store for free
https://assets.clip-studio.com/en-us/detail?id=1759448
this thing is absolutely magical. you simply
- mark the lineart layer(s) as "reference layer" (this tells CSP/the tool that this is your lineart -- you should do this anyway)
- on the color layer you just draw a circle around the shapes you want to fill
- boom. it's filled up to and including the lineart but doesn't bleed out beyond the lineart
sometimes the gaps are too big for this tool and in that case its simple enough to manually fill in some of the gaps and try again, but it saves SO much time compared to filling in the entire outline and the results are very good
this has been my method of choice for my recent art, including the more doodly ones with lots of big gaps in the lines
EDIT: i heavily use this tool in combination with this "Erase Along Edge" tool:
https://assets.clip-studio.com/en-us/detail?id=1800143
which is an eraser tool that's set up to not cross the lineart (reference) layer. it's not that great at ignoring gaps, but great for parts where there are no gaps. i use this to clean up any overspill from manually drawn colors.
beyond filling
after filling in the entire base shape with a base color, i clip/mask my color layers to the fill layer so that my colors stay within the lines. i then use the close and fill tool for any big markings or color areas too, and then start using a coloring brush for any areas that can't just be filled in
i realize the conclusion is very CSP-specific. i do still think that drawing around the outline, filling that in, and then masking your other colors to the fill layer, as a general method, is nice to do and works in every art program
the moment your gaps become EVEN bigger than this, or you start using very textured brushes, then filling with special tools like this will stop working anyway and your only option will be manually filling in the outline anyway, so its always nice as a fallback
hope this helped!


