Well my personal opinion ‘ being new at it ‘ id find yourself a nice big open space as possible & keep it quite near & not to high untill you are comfortable with flying up/down orientation left/right etc,
That’s quite hard to answer & comes down to being aware / experience what is around you & good judgement ‘ call it if you will ‘, sometimes things can look closer than what they really are as vice a versa look further away than what they are or higher or lower than what they really are if that makes sense, so good judgement is key & will all come in time but the other thing to consider is, if say the tree or the building near or around you is say 200 feet high ( guesstimate ) make sure you set you RTH height ( return to home ) so it’s higher than the tallest thing around you as in the event of a connection loss or hitting the RTH button you don’t want it crashing into anything like you’ve mentioned above, I hope that makes sense for you
Also when time allows you it maybe worth taking a look in this thread Here as it has some good information for when starting out ….