Your question is completely opinion-based and off-topic.
Your question is :
“I have a laptop obviously, and Windows. I program a lot, and I was wondering what things should I do to optimize its lifetime, and usage. I use Powershell, and CMD, and batch file programming. Any recommendations?”
Without any specifics, this is already a too broad question. And even with specifics, nobody could ever give you a solid answer. I have programmed on MacBook Air 11” models from 2013, Mac Pro towers and now a MacBook Air (2020) and I have never had issues. It’s not too much different for Windows machines; even the most basic barebones Windows machine can be used for programming.
Besides, the premise of the question is basically:
“I have decided what I am going to use my laptop for is complicated. Therefore I have also assumed complexity means that the system will be stressed. Therefore what can I do to extend the life of this system.”
None of what you are asking makes any practical sense. And then your meta question doubles down on this; bold emphasis is mine:
“My question would not to be searching for software solutions, or any hardware changes more so a common practice like how to better manage my laptop if you get what I mean? Or is this an IT support question?”
I have no idea what you mean when you say “…better manage my laptop if you get what I mean?”
- Do you really think there is some one “secret” tip to using a laptop for programming?
- Do you believe laptops fail because — for example — a laptop used for writing is not used as “heavily” as a laptop that is used for programming?
- Do you really believe that when laptops die or need repair you need to specify what you have used the laptop for to get it repaired?
The reality is some salespeople and repair people will ask you — honestly — dumb questions like “What did you use this laptop for?” but they only do that to upsell you are repair and replacement parts. Stuff like “Well, you need faster RAM or a better mouse…” and such.
While well intentioned, your question is assuming tons of negatives that you are attempting to “prepare” yourself for.
Instead of doing that just buy a laptop you like and don’t let salesman “doubt” questions infect your decision-making.