Sounds like the American edition of "The Lord of Shadow Keep" (Golden Dragon Fantasy Gamebooks #3). The British edition, and some newer releases, had different cover art.
I believe the book is somewhere between the '70s to '90s range
1985 (1986 for the US edition) according to gamebooks.org.
There's a lot more information on Malthus Dire's blog. Some of your specific points are addressed therein:
In the front, you would roll for your stats as a character and write them down
To make it even harder, you need a very high Psi stat to stand any chance of mentally coming to terms with the Keep’s inhabitants (Vault Of The Vampire would employ the similar stat of Faith, House Of Hell used Fear, and Beneath Nightmare Castle handled this as Willpower, to name but a few of the plethora of different approaches to this idea.) Add to this the fact that you also need a decent Agility score otherwise you have no hope in Skill or Luck test-equivalent situations, plus a very high Vigour stat to survive the many Stamina-reducing happenings, and you get a book that cannot be won without superhumanly-high attributes (so Ian Livingstone would have approved, then!)
As you go through the book, you would make rolls for combat.
Basically, each combat scenario is different, but many are pretty weighted against you. You throw two dice and then check to see what the outcome is. Some combats lead to instant death if you roll a 2, most are just either you or the enemy taking damage, but some have very different results dependant on the number rolled. In some cases, a higher roll can cause severe damage to either you or your foe.
There are some reviews on Demian's Gamebook Web Page.
And a playthrough at Richard Tongue's blog.
And some more information at Fabled Lands.
EDIT: It turns out you can also borrow an eBook of it from the Internet Archive's online library! It's at https://archive.org/details/lordofshadowkeep00oliv