Making PBR textures using blender

Usually, I go online to download PBR textures to use on meshes. Usually, they turn out fine, but sometimes I cannot find a specific PBR texture. I was wondering if it is possible to model a detailed object, like a brick wall or a plain with grass, render it as an image and turn it into a PBR texture. Is something like that possible?

You can use the bake functions with cycle:

or use dedicated add-on to simplify this process, like this:

there is a lot of free tools like this.