If you have a Mac from 2010+ (perhaps even a Late-2009 model), then that Mac may have access to the online macOS installers through Internet Recovery Mode....using Command + Option + R is best since it should access the most recent installer compatible with your Mac, or if there is only a local recovery mode, then it should allow you to access the installer without authenticating with an AppleID which would fail since your AppleID never "purchased" any of the older macOS installers.
How to reinstall macOS - Apple Support
Otherwise, you would need access to another Mac which is able to utilize an OS your own Mac can use. For example if your Mac is compatible with macOS 10.13, then you would generally need access to another Mac from Late-2009 to 2018 in order to create a bootable macOS 10.13 USB installer since only those model Macs are compatible with macOS 10.13 (the Macs can currently be running any version of macOS 10.6+). You can use this article to determine which versions of macOS are compatible with various Apple hardware in order to determine the versions of macOS your Mac is compatible and to verify whether any other Macs you have access to are also compatible.
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility
Here is an Apple article with instructions for creating a bootable macOS USB installer (requires access to another Mac able to boot macOS):
Create a bootable installer for macOS - Apple Support
FYI, you should always provide the exact model of Mac so we can provide as many options as possible since some older Macs used macOS DVD installers, while newer Macs (2018+) have options for a firmware "Restore" although the latter still requires access to another newer Mac. You can get the exact model by clicking the Apple menu and selecting "About this Mac", or if it has no bootable macOS, then enter the system serial number here:
Check Your Service and Support Coverage - Apple Support
If you don't know of anyone with a compatible Mac, then maybe see if the Apple Store or an Apple Authorized Service Provider will assist you....some may help.