Carbon capture on vessels while they sail has been achieved behore by Mitsubishi in 2021.
https://www.mhi.com/news/211020.html
The challenge is where to store that CO2 while sailing as each ton of fossil fuel burnt creates 3 tons of CO2. The average ocean going vessel burns approx 200 tons of fossil fuel per day = 600 tons of CO2. On a 10 day journey that results in 6000 tons of CO2. That requires a lot of space and additional weight.
https://www.wartsila.com/marine/products/exhaust-treatment/c...
The Wärtsilä carbon capture solution works in five main stages: pre-conditioning, absorption, desorption (or stripping), liquefaction and storage.
[...]
The final stage is storage. The liquid CO2 is pumped through pipes to onboard tank(s), where it is stored until it can be offloaded.