Can we covergroup inside a monitor

In reply to Vickyvinayk:
Please try
function new(string name=“fifo_coverage”, uvm_component parent=null);
super.new(name,parent);
sync_fifo_cov = new();
endfunction:new

virtual function void write(fifo_seq_item t);
seq=t;
sync_fifo_cov.sample();
endfunction

You did not construct the covergroup.