Are you trying to us the raster data as visualization or as an image service, so that you can access imagery data and perform analysis?
ArcGIS Online currently does not support image services. If you want to have web access to imagery data, you will need to publish to ArcGIS Enterprise: https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-image-server-.htm
If you are looking to use the raster data for visualization only like a basemap and do not need access to the underlying data, then I would encourage that you publish a tile service: https://doc.arcgis.com/en/arcgis-online/manage-data/publish-tiles.htm. Note you will not be able to change the visualizations of the data unless you republish if choosing this method.