I see that File Exchange has a function gebconetcdf that someone created, and then I discovered the code that I need:
gebconc = netcdf.open('gebco_2021_n60.0_s10.0_w-90.0_e-40.0.nc', 'NOWRITE');
XGRID = netcdf.getVar(gebconc,0);
YGRID = netcdf.getVar(gebconc,1);
BATHY = netcdf.getVar(gebconc,2);
netcdf.close(gebconc);