Very large topic. I'll do my best. I'll focus on a couple of general things.
Institutes
An institute in general. Has to have some sort of connection to science/knowledge and promote it.
Contradictory to what movies want you to believe. The church was not science hating as you would think. Many early scientists and people experimenting with science were full on clergymen or otherwise connected to the church.
I don't want to simplify it or have an argument about the whole catholic church vs science stuff. My only purpose is to use some of that and apply it to you work.
Similarly it took about a 100 years for Islam to have established kingdoms and what followed was a lot of the same ideas. Science and prosperity and people working to build a civilization.
Anyway. My point is that you need 2 main things.
1- A general drive towards knowing, experimenting, and improving life.
2- Institutes that function to that end.
Your people have be religious or nihilist. Believing that building stuff rewards them from god or that we only got this life so we might as well do all what we can. But they have to have that drive, that ambition.
The second part is also important. As it is the one that will record and continue research. A large library that is well organized, promoting science, rewarding research...etc are all important steps in building a scientific community.
This also need to function with a degree of independence.
By that I mean if you institute is completely reliant on state, it subjects it to the whims of the rulers. But if they have their own lands that they can at least sustain themselves. If they have some little extra money to buy stuff and experiment. If they have a place to stay and welcome this. Then you might expect good results.
Our modern day doctors and scientist get paid after all. You should not expect everyone to approach life from a completely altruistic motive. And oddly enough people can start something just for the profit and end up loving it and devoting their life to it.
Need & Pressure
Then changing life in medieval Europe lead to rise of a small elite force of knights, function as many were just men at arms but I digress.
This in turn meant that a number of people had a lot of money. Were expected to fight and lead armies.
This has lead them to commission, best stuff was commissioned btw, armors and arms. Which lead to a rise in the relevant professions.
This lead to the development of the full plate armor. Some are like tanks. And exquisitely made and decorated.
Also stuff like aqueducts. Again a need arise to supply very large city with water. People come up with solutions. Engineering improves.
The It is similar with horses. Horses used to be much smaller, we kept breading them to be bigger and stronger. So. It's not just science.
So. Your nation needs some pressure and needs. Nothing too much like a world war or an alien invasion. But also it needs to be real.
This can be anything. Rival nations, goblins and orks, general magic beasts, demons, neighboring elves that hate humans...etc
It should be there and real. And it should be dangerous and problematic, without being too much.
For example. Lets say your nation has a mountain range beyond which endless hordes of goblins roam the land. They gather every few years and start raiding.
Now. Someone makes a cannon or a gatling gun and uses it on the enemy. Seeing the destructive power of the weapon. The leaders would sure as hell will pay well and want more. This in turn will lead to improvements on the original designs, others copying it, others making similar stuff...etc.
But if your state is peaceful with nothing happening. Ah well. Who cares. Nothing ever happens here.