When you post photos on social media or on any website that you do not own, you are subject to that website’s terms of service. You should carefully read the terms of service for any website that you are considering posting your photos on. If you don’t agree with the terms, don’t use the service.
Most major photo-sharing and social media websites have terms that state that you keep your copyright to the work you post there, but grant the company a license to copy and distribute it. The terms of the license granted may vary. Keep in mind that a website may change its terms of service periodically, so you should make sure that you are aware of the current terms.
Other websites, such as Unsplash and Pixabay, exist to provide public domain images to the public. Therefore, the terms of service for sites like these state that by posting your work there, you are releasing your work into the public domain, often with a Creative Commons CC0 dedication.