According to Linkedin... "LinkedIn backlinks are typically no follow links. This means that they include a rel="nofollow" attribute in the HTML code, signaling to search engines that they should not pass authority or influence rankings to the linked website.May 16, 2023".
However you should not only focus on Linkedin and Medium. Try to use a much wider selection of valuable websites where you can post your articles and gain valuable backlinks. Don't get carried away though, always check the reputation of the websites, you don't want any spammy ones! Also, don't forget your on page SEO work. Building backlinks is not enough on its own.