How to deal with changing values in prefabs on real time

Hello, search doesnt find much on this, and maybe its because of my poor way to express it.
What i want to do is this:

1- I need a way to change a prefab value while on play, for example, i need my “bug” prefab to double its HP and Damage every 5 minutes

2- I want my “Robot” prefab values to be changed though GUI (upgrading their stats by using money from killing bugs) so all new produced robots have the new stats.

For the first i thought of putting a function that will modify the values when the bug is instatiated on the spawner game object, and just modify the values by multiplying them with the level counter clock.
But i dont know what to do with the second, and the answer to the first doesnt look good and will surely waste computer resources on each spawning.

Can someone enligthen me on this? Thanks.

Bump, please i need help on this

the best way I can think of is what you said, have a global variable that you change after a certain time, then have a script in your bug prefab that in the Start() multiplies the health by said variable.
You can do the robot in the same way, have a global variable that it checks to update itself.
One check on start isnt going to use up loads of computing power.

Ok, i get what you mean, to update the stats once at Start() from my AI script.

Thanks, but i thougth there could be another way.