For Online Computer Support, Ask a Computer Technician
Can you open your hard drive from its icon then open Applications and see if Safari is there, If it is can you just drag the safari icon from the Applications folder to your dock then let go and let me know if it then appears in the dock.
Let me know if you have any issues
Honestly sometimes you can inadvertantly catch the icon when you are trying to double click, The issue is that when you move an icon from the dock it goes poof and dissapears, it does not just land on the desktop so you can replace it.
Anyway I am glad you got it sorted out