The most crucial part of troubleshooting any RimWorld issue is giving potential troubleshooters all the necessary info about your case. There are almost zero cases where providing a full log isn't essential or at least helpful - and it only takes you seconds. Not attaching your log immediately to your case can drastically lower your chances of getting help and might prolong the process - so don't wait to be asked for one!
There are two main log types: the game's Player.log (always generated, available even from outside the game or after crashes) and the Hugslog (via mod, showing the full log but with extra details and benefits). Always provide a full Hugslog whenever possible; otherwise, use the Player.log in combination with your modlist (more on that later!)
The Player.log-file is constantly written by the game itself in your user folder. It logs internal errors, debugging info, and basic hardware/system details. Each launch overwrites the file, renaming it to Player-prev.log as backup - so you always have logs of your current/last and second to last session available. When troubleshooting, make sure share the correct file from the session the issue in question happened. Don't accidentally send the wrong one!
Don't bother too much with reading your log mid-crisis if you're not used to it, it might not make much sense to you anyways - save that for an eventual deep-dive later and keep in mind that your Player.log is your fallback when more detailed options like a Hugslog aren't available. It's also vital for crashes (before reaching the main menu at all), often including the crash-stacktrace to pinpoint the cause.
Due to reduced information compared to potentially more verbose log-sharing methods, always pair your Player.log with your modlist: The log lists your modlist only in certain situations, so make sure to attach your ModsConfig.xml to give your troubleshooter necessary, additional context!
Sharing a (full) Hugslog always beats the game's own Player.log by offering more details which can be important for any troubleshooter to investigate your case.
You get it via the "Share log" [A] button in the in-game debug menu or the keyboard shortcut: Ctrl+F12 which uploads your current log to Github/Gist which lets you copy the link to paste it directly with your troubleshoot-post without the use of an external file hoster.
If it should be necessary to share it that way though, Ctrl+Alt+F12 dumps it to your clipboard from where you can paste it elsewhere. As a further benefit, the Hugslog typically contains your full modlist by default, so unless someone asks you for it - you don't have to provide your ModsConfig.xml in addition like you do when only having access to the Player.log.
To access a Hugslog you have to use one of two mods: either the original Hugslib which is currently in the process of being made obsolete. The mod isn't in a particular good state for years and the few mods who still use it as dependency are as well moving away from it. As of the time of writing it's barely necessary if not for maybe 2-3 popular mods still using it. Those are typically dated as well and you should consider moving on to more modern alternatives anyways.
The other, preferred option is to use the standalone Log Publisher from HugsLib by M00nl1ght which offers the same features - even with some improved aspects - and is actively maintained. So if you find yourself not already using Hugslib - or the mod isn't working for you in the first place - you're better off going with the standalone publisher!
If Hugslib (or the standalone Log Publisher) fails to upload your log due to API-key issues - or if you simply want logs saved to your own GitHub account - you can use a personal access token [B]. Press Ctrl+F12, then uncheck "Use recommended settings" to reveal the advanced options including the token input field.
This might be mostly relevant for advanced users, but might come in handy when regular log-uploads fail for whatever reason.
You also get some generally useful options here, like removing the 10.000-line-limit for Hugslogs by checking "Allow unlimited log size".
Most file-hosting sites technically work to share your logs, but many are region-blocked, get shut down overnight, or mangle logs with aggressive filters and bad formatting (line-wrap issues, censored words in stack traces). That can turn what is an otherwise simple step in any troubleshoot into a real bother. When in doubt, stick to a proven option that at least displays raw text cleanly. And always keep in mind that troubleshooters can ignore posts using problematic services - the logs could be borderline impossible to read/parse, they could be from regions which have those sites ISP-blocked, etc.
Additionally you always want to open/click your link at least once and double-check if it's actually set to be publicly accessible!
Some file-hoster options that Void Archives recommends:
Gist (Github)
The direct text-hosting service by Github and the same way Hugslib itself uploads and shares its logs. Because of that it should be the preferred method overall. The main downside here is that you need a (luckily, completely free) Github Account to use it.
Pastemyst
A simple and quick service usable without prior registration. Its main purpose is for sharing code but the readability of RimWorld logs is still good enough. Ideally select 'Plain Text' in the language selection before uploading.
Pastes.io
PSA: Still needs testing how well it handles RimWorld logs specifically!
JustPaste.it
PSA: Still needs testing how well it handles RimWorld logs specifically!
dpaste.org
PSA: Still needs testing how well it handles RimWorld logs specifically!
paste.rs
PSA: Still needs testing how well it handles RimWorld logs specifically!
Pastebin
Since issues with Pastebin have been coming up more and more again, this option is not recommended anymore!