There are two broad ways this could pan out:
If it's the first, there's not much you can do harping about it. Learn from your experiences and move on. Try to get feedback from your supervisor and HR team as to what you could have done differently.
If it's the second (assuming you know it is), then start working on a paper trail to effectively document your accomplishments in a manner that is relatable. I typically have my direct reports fill out an Excel spreadsheet throughout the year, broken down by month, where they list their accomplishments and failures. That way, at the end of the work year, they have a ready reckoner about their highs and lows. If you have such a document, use it to demonstrate the value you bring to the table. If you don't have one, then use your memory to create one after the fact.
Finally, all this comes together through goals. Were you working towards a documented set of goals? If not, add it to your learnings. If yes, identify the gaps that have led to this situation.
All the best.
Advice is always contextual. Here in this case, there so many unknowns to give a good advice (forget about solid advice). What I mean: I don't know if the one under PR is so because of lack of competence or because of cost-cutting, or because of unclear goals set by management and so on. I don't know if you are a junior or a senior. I have seen PRs in each of these cases and more. Different situations warrant different advice.
Because the discussion is on hashnode, I am going to assume that you are competent enough but in a shitty role (you could be a php developer doing a python project, or a backend developer asked to move to front end; it might all look silly, but I have seen these cases).
First rule in these situations is ability to walk away from the discussion table. If you have that ability you develop an upper hand. Remember, you don't have to have options in hand to do so, just the mentality. So see how you can develop it in the short term you have. Some of these ways could be:
If you think they have decided to fire you any way, start looking for a job. It is going to be emotionally difficult. If needed, go to a mountain and cry your heart out. Then go and face the difficult situation.
Shit happens. You will survive.
j
stuff ;)
Two options:
I would go for the second option, every time I was scared or loyal I got played.+
learn from it, improve, move on. How do they measure performance ? The only way they could do so if all would work on the same task in parallel .... There is no valid metric so f*ck them .... you deserve better ;)++