You may have settings set to Edit by default in your SharePoint admin center. you can change this to "View"
It doesn't matter what permissions you have unless you have explicitly restricted them, even if you are logged as "Visitor" you can share "View only" link to document, follow the screenshot below you can see steps to share links with Anonymous users.
To enable Share with anyone, you need to enable "Site level" sharing. To do this, go to SPO admin center>> Active Sites >> Select the site where you want it enabled >> click sharing as in below screenshot >> Select Anyone >> Save