setCanvasResolution & setCanvasFillMode purpose

First of all, these functions modify the canvas element, but where is it? Is it created automatically for me?

Then, I can understand the purpose of the setCanvasFillMode function - FILLMODE_NONE is to set specific canvas size, FILLMODE_FILL_WINDOW - to simply fill the window, and FILLMODE_KEEP_ASPECT - fill the window, but keeping the ratio (again, the ratio of what?). But what is the purpose of setCanvasResolution? It seems like this function does the same thing, right?

And what are the default settings for these functions?

If you are using the Editor, you can see the settings under rendering the options for this:

This page explains the settings than I can: https://developer.playcanvas.com/en/user-manual/designer/settings/