Lore reveals should reflect character build and story
Lore check rules deliberately leave things very open to DM discretion, but hints about how this should work are scattered through the Player’s Handbook.
A little history
In the previous edition of D&D (4th Edition) what information could be gleaned from successful lore checks was codified, and any character who succeeded on the check would glean the same information.
While this made it easy for a new DM (like yourself) when I tried using the system, my players found this unsatisfactory. They would ask, as a member of their particular class, race, etc., wouldn’t they know some other kind of detail?
Backgrounds and Character Builds
Guidance on what knowledge characters have is now scattered though the character options section of the Player’s Handbook (Chapters 2, 3, and 4) as well as in other character build rules, e.g., The Sword Coast Adventurer’s Guide.
Regarding your example, characters with the Soldier background know “how to say alive on the battlefield” (Soldier background, PH p. 140) so they might know signficiant details about “enemies’ abilities or attributes” — especially if they had been involved in a military campaign against that particular enemy/creature type.
(Aside: Whether you as a DM reveal the exact AC or Hit Points is more a play-style issue. Some groups feel this meta-gaming breaks immersion, and prefer to use “in game” language for this, such as “The goblins are a little tougher than the kobolds you fought before.”)
On the other hand, if that creature has “special actions apart from melee/ranged attacks” that are never relevant to the battlefield, a different character might know more about these details. “A sage values knowledge highly—sometimes in its own right” (Sage background, PH p.138) so a character with this background could be more knowledgeable about the esoteric details about any topic.
Don’t let the dice tell you what to do
Sometimes a particular character (in your judgement, as DM) would definitely know a relevant detail. Reveal this information even on a bad lore check. For example, a cleric would recognize a depiction of his own deity.