Do you keep track of what you eat everyday?
Do you know about how many calories you eat to maintain your current weight?
No one can give good advice here without knowing what you are currently doing, or what you have tried.
There are so many options in terms of diet. You will find people here who have been successful on a number of diet plans. There's no one correct answer - "The One True Diet". Anabolic, Zone, Paleo, Get Shredded, Atkins, Low fat, Low Carb, Intermittent Fasting, Carb Cycling, Targeted carbs on workout days and around workouts, eat a lot of cabbage soup, don't eat after 7, re-feeds at various schedules, whatever.....
Honestly, I think the two biggest factors for someone who wants to gain and maintain muscle are:
-Adequate Protein. At least 1 gram / lb BW.
- Total Calories.