As long as the cooked steak has remained refrigerated or frozen during those 5 days then yes the cooked steak will be still good to eat after 5 days of being refrigerated or frozen.
The refrigerator or freezer helps to keep bacteria from growing on the food so the steak remains safe to eat after those 5 days.
However if the steak was left out for 5 days then no that would not be safe to eat and it would smell awful where you would not want to eat it anyway.
But you can keep steak in the freezer even after it's cooked for a year or longer although the steak will lose it's freshness.
If the steak is in the refrigerator it may start to go bad after 6 to 7 days but if it's only been 5 days that the cooked steak has remained refrigerated then it's likely okay to eat.
Just make sure it tastes good and doesn't have any bad smell to it and if tastes bad or has a bad smell to the steak then it likely is bad and should be thrown out.