The duodenum is the first portion of the small intestine. It is connected to the pylorus. The duodenum has ducts from the pancreas and liver known as duodenal papillae. Additional duodenal ducts secrete mucus.
The jejunum is the second and largest portion of the small intestine. Its primary function is to absorb sugar, amino acids, and fatty acids.
The ileum is the third and final portion of the small intestine. It has Peyer's patches which serve a purpose in the immune system. The ileum also absorbs nutrients.
https://gutpathogens.biomedcentral.com/articles/10.1186/1757-4749-5-8