The current FIDE document defining how titles are earned is FIDE Title Regulations effective from 1 January 2022. This is what it says regarding "direct titles":
0.6 The Award of Titles
0.6.1 Titles may be awarded for specific results in specific Championship events, or are awarded on achieving a rating as laid down in these regulations. Such titles are confirmed by the QC Chairman on advice from the FIDE Office. They are then awarded by FIDE.
0.6.2 For a direct title to be awarded immediately an applicant has to have achieved at some time a minimum rating as follows:
GM 2300 WGM 2100
IM 2200 WIM 2000
FM 2100 WFM 1900
CM 2000 WCM 1800
If an applicant is rated lower the title is awarded conditionally and will be awarded finally on request by the respective federation as soon as the minimum rating is achieved. Any player with a conditional title may take a lower title when they reach the required rating for that lower title.
There are separate tables for direct titles. These notes apply:
1.2.4 erms used in Tables for Direct Titles:
Gold = first after tiebreak
1st equal = best 3 players after tiebreak
norm = 9 games
Continental and Regional = Continental and a maximum 3 regional events per continent, and include Arab Youth.
As above, each Continent is allowed to designate a maximum of 3 regional youth events for direct titles. The Continent must inform QC of any change in the composition of these regions before the beginning of each year.
Sub-Continentals - include Zonals, Sub-Zonals and Arab adult.
Zonals and Sub-Zonals are accepted for direct titles only if they establish qualifiers to the World Cup or World Championship.
These tables are specified in Table for Direct Titles effective from 1 July 2017
In summary these achievements entitle you to a direct title of GM:
World Cup - Reaching last 16
Women's World Cup - winner
World Championships >65 >50, Individual World U20 - Gold (i.e.first after tie-break)
Continental Individual Championships - Gold
In other words, only results which pretty much require you to already be a strong GM.