Set off and carry forward of losses

If I have STCL for FY 2021-22 and I want to set off against LTCG of FY 2022-23, can I do that?