So this is what I worked out for myself, I'm sure there is a better way to do it.
First off, you get level ups when you gain enough in your chosen skills. Second, you get stat bonuses when you level up.
So you want to gain as many levels as possible, which means you need to improve them as many times as possible before they hit the maximum. You need to select skills that will be as low as possible at the start of the game. If your race gives you a bonus to something you chose as a class skill, you're just cheating yourself out of a level.
As for stat gains, you want to raise a skill 10 times to get a +5 to the stat on your next level-up. This probably means going to a trainer and paying to train a skill a bunch of times to get that +5. If you just raise your class skills, I think every 10 skill gains gives you a level, so by the time you got three +5s you would have gained another two levels. And you can't really just not level-up, because it happens when you sleep, and going without sleep is really tough at first.
You need to max Endurance ASAP because your HP gained per level is based on your END at that time. Later raising END won't give you bonus HP for your lower levels. It's not retroactive.
You also select 3 stats to raise each level-up. You need to choose two stats and then Luck. This is because Luck will never get a multiplier because no skills are linked to Luck, so if you want to max it out you need to start immediately. Also at some point you might be stuck with 3 stats to choose but you've already maxed them out, so you're only getting that point on Luck and wasting your other two picks.
You want level-gaining to be quick, so generally pick quick skills for your class skills. Athletics and Acrobatics are good choices because you will do them constantly and they are super important to your enjoyment of the game. Run speed and jump distance are very enjoyable, and lack of them really sucks. Alchemy also raises very quickly. Try not to pick all of the skills that are related to one stat. Because:
You will find that your main problem is that you can level up, but you don't have the money to train up other skills enough to get two x5 stat picks. If you're doing well, you probably gained 10 skill points in your class skills but they're scattered around. You'll need to train outside your class skills for 10-15 skill gains to get the maximum stat boost. This is much easier and cheaper if you have a couple skills to choose from instead of just one. As I recall, Agility is used by a lot of skills but Endurance not so much.
Don't pick more than one weapon skill or armor skill. You should choose Heavy armor. You can get by with Medium, but Light and Unarmored are kinda worthless. When it says in the manual that you can achieve better defense without armor than with armor if you have high Unarmored skill, what they mean is that if you have no skills, you may have Defense 10 in heavy armor and 0 with no armor. If you Unarmored skill is 100 you might have Def 10 in Heavy and Def 20 with no armor. But if you had chosen Heavy skill in the first place, you'd be Def 150 in Heavy and 0 without armor. They're trying to say that it's better than nothing, but you have a lot of better choices than nothing. If the game came with stealth and spellcasting restrictions based on armor maybe it would be worthwhile to not wear Heavy armor. But it's just better as-is.
TL;DR: Make a character as low-skilled in your class skills as possible at the start. Always pick Luck and two x5 stats at level-up, one of which must be END until it's maxed. Pick easy skills for your class skills like Athletics, Acrobatics, and Alchemy.