First sentence: "Do not seek fame"
Second: "I can't seek fame, huh" or "I can't ask for fame", or some other potential translations depending on the context.
The most common use case for な is the one indicating emotion, as a sentence-ending particle.
な for its "do not" meaning is always following the dictionary form of a verb. Mind you, the first meaning may also follow the dictionary form, so you will need either context or tone of voice to separate them.
The "ordering" meaning always follows the stem (the form you put a verb to stick "-masu" to create a masu form. For 行く->行き, 走る->走り, etc). So for your example, it'd be 名声を求めな (because the steam of this verb is just removing the る)
Please refer to grammar resources for a more in-depth explanation.
how to use it and what it means
名声を求めるな is it go seek for fame or is it dont seek for fame cause i think its the first i said , and this one 名声を求めないな is dont seek for fame .. so the question is whether i dont get something or im fine