Imo it’s never a good idea to completely disable the firewall on your machine. Disabling ufw works because ufw blocks all incoming by default.
As long as you know the LPORT for the metasploit session, you could probably just do
sudo ufw allow from [RHOST IP] to [LHOST IP] port [LPORT]