At my last job I was in a project, my performance was good, I was even going to get a raise (but the pandemic happened and it was on hold), then I was changed to another team and project, manager thought I was doing poorly and I got laid off.
I would explain it in that same exact sentence except leave the last part out. Just say you were laid off because the pandemic hit and your project got put on hold and ultimately got laid off.
However, it's important to understand laid off vs fired. If they laid you off, then you are good to go. If you were fired for poor performance, then you need to bring up at your next interview and go with the full story above that a project switch during the pandemic ultimately lead to a poor performance.