Top Down Shooter - Have character move relative to current rotation

I started Top Down Shooter game, but from the third person template (a recommendation from a YT tutorial).

I have a function that rotates the character towards the mouse cursor, with a max rotation per tick. And then I managed to change the forward/backwards character movement controls to work the way I want them, meaning, to always move towards the character.

But I haven’t been able to do the same with the side movement. It either always moves in the same direction (world X and Z axis) or it moves the character in the axis I want but it also rotates it, so it starts doing some weird circles. I want to move sideways relative to the cursor rotation always, so that the player can “peak” a corner for example.

I’ll attach some screenshots: