The name, first name, email, etc. that a person indicates on his Linkedin, Facebook, Twitter or other is not public data.
Public data is strictly defined and publicly available data is not part of this definition.
Many companies still think they have the right to take personal data that a user publishes on the Internet or a social network to send commercial prospecting emails for example without taking any action with regard to the rights of the data subject.
A personal data remains a personal data, even if this information is communicated to the public on a place as large as the Internet or simply LinkedIn.
And as for any collection and processing of personal data, rules must be respected: the processing must be lawful, provide all the information to the data subject and/or his consent and respect the right to object, for example.
To learn more about public data and how to process data available on the internet, you can read my full article here: https://www.dcavocat.com/données-internet