Trans as a general concept refers to any time your gender is not in alignment with that which has been assigned to you. There can be some funky edge-cases that are debated and contested, so let's not worry about those since for now there's no real consensus. I will be simplifying this because even with a mod directing me here, it feels weird for me to be talking about this in an AI server.
But trans can include binary trans people (their gender identity aligns with that typical of the opposite sex) and nonbinary trans people (their gender identity aligns with a role not associated with either sex). Agender refers to a type of nonbinary who associates with no concept of gender. This can be because of apathy or it can be due to having none of the intrinsic feelings associated to gender.
There are some nonbinary people who do not identify as trans, and this can be for a variety of reasons that are unique to each individual and personal and it is best to just respect that.
There's also gender non-conformance which, while common for nonbinaries, is not inherently connected to being nonbinary. You can be cis and gender-nonconforming... Typically effeminate boys or tomboy girls. This is unique from being nonbinary, though again, it's a complex subject.
That should at least be a decent primer based on the confusion I saw from people? If you have questions, just ask.