Do you know how I can add a layer that I used hosted feature in an online map?
I'm not 100% clear on what you are asking: are you asking how to add a layer (for example, a hosted feature layer) to create a new web map in the Map Viewer?
Add layers—ArcGIS Online Help | ArcGIS
If not, can you please elaborate?
Hope this helps,
Retrieving data ...