nothing wrong with working out on your own
but do your research, read about exercises and watch some tutorials. plenty of great youtube channels who give great advise
as for injuring yourself, that can happen in a gym as well. besides most local gyms don't have proper coaches or if there are...