Can you clarify the different OAuth grant types and when to use each one?

Updated 

Authorization Code Flow with PKCE is an enhanced version of the standard Authorization Code Grant, providing better security for public clients like mobile apps and SPAs. Device Code Flow is designed for input-constrained devices, allowing users to authorize these devices using another device with better input capabilities. Choose PKCE for public clients, and Device Code Flow for devices with limited input options. Learn more.