In this chapter, Moses gives the Israelites laws covering many topics.
As much as I like trying to find unifying themes in the passages I write about, this one really just seems to be a grab bag of various things that have little correlation.
The last chapter shifted the discourse from the topic of murder (6th commandment) to adultery (7th commandment). This chapter doesn't seem to relate to either adultery or theft (the 8th commandment).
Since I don't see any overriding theme, I will simply address the laws of this chapter in order.
Verses 1-5: In retribution for the hostility of the Ammonites and Moabites (Num 22). What's interesting is that we weren't specifically told that the Ammonites ever did anything to Israel. The Israelites fought against the Amalekites, Amorites, Moabites and Edomites to various extents, but never the Ammonites. We know that the Ammonites and Moabites would likely have been allies, both descended from Lot. That is probably why the sons of Ammon are included in this passage.
Secondly, the phrase "assembly of the LORD" does not mean membership in Israel, because men with injured genitals would still have been within the community. Probably this phrase refers to religious convocations, because we had already been told that priests with injured genitals could not minister before the LORD (Lev 21:20). However, that same passage in Leviticus tells us that those priests may still eat of the holy food, so the prohibition is not total. Similarly, what this means is that Ammonites and Moabites are still allowed to convert (Ex 12:48), but would not be allowed into the ceremonies of the tabernacle and the courtyard.
Verses 7-8: The Edomites also resisted the Israelites (Num 20:18), yet here the Israelites are commanded to "not detest" them because they are brothers (Esau, aka Edom, the brother of Jacob), while the Moabites are only cousins (sons of Lot, brother of Abraham). Meanwhile the Egyptians enslaved the Israelites for generations, but are not to be resented because they were a "host" to the Israelites, after a fashion.
(skipping verse 9)
Verses 10-11: This appears to be similar to Lev 15:16.
Verses 12-14: Basic health ordinance, but with religious motivation. This is also another example of how the Israelites emphasize the concept of "covering" like I discussed in Deut 21. In the Hebrew, verse 14 talks about keeping the LORD from seeing the "nakedness of anything" in the camp, which shows the continuing allusion between nakedness and sin. Covering is the opposite of nakedness, whether that means burying bodies or feces.
Verses 15-16: Interestingly, slavery is permitted in Israel (mainly slaves of foreigners), but runaway slaves are not to be returned. This almost seems like a contradiction, but I cannot explain it.
Verses 17-18: I think this might be the first command directly against prostitution in Israel, but it makes sense given that Israelite women can be killed for having sex before marriage (cf. Deut 22:20-21). So this law is anticipated by the laws that came before.
Verses 19-20: Restating an earlier law. Ex 22:25, Lev 25:36-37.
Verses 21-23: Not much for me to add here. If you don't make a vow (i.e. commitment to the LORD to do something), then you are under no obligation. But if you say you will do something, then you have to keep your word.
Verses 24-25: This is the natural corollary of Lev 19:9-10. Owners are commanded to leave bits of food in their fields, and passersby are permitted to eat from the fields. However, passersby are not permitted to reap from others' fields. The point is that you can eat to fulfill your need, but not reap for personal gain out of the generosity of another.