get terra to produce same output as raster::rasterToPoints
rasterToPoints2(rast)
rast
A raster to convert to points