Hi Denizhan,
you don't need to install MATLAB on your Ubuntu system. MATLAB on your Windows will be able to communicate with ROS installed on WSL.
To test you can run on your WSL:
ros2 topic echo /chatter
and in MATLAB:
node = ros2node("/MyNode");
pub = ros2publisher(node,"/chatter","std_msgs/String");
msg = ros2message(pub);
msg.data = 'Hello!';
send(pub,msg);