Chunk Loader to Optimize my game's performance

I am trying to make a chunk loader for my game to optimize as it currently runs very poorly on low end devices having a lot of parts. A way to increase the performance a lot is to implement a chunk loader which will gradually load parts as you get closer to them. The problem is, I do not know how to make one.

If you have any code snippets, recommendations or anything that could help me, please contact me.