@magnanelli Alfio - the pedal I will use is a very specific one - a Digitech Trio+. Some would describe it as a ‘band in a box’ type of pedal.
You play a basic chord progression to ‘teach the band’ what the song is. The pedal learns the progression and, based on some use-selectable settings, will start to playback a bass and drum part to match. If you don’t like the part, you can change some of those settings until it suits. Then you can record a guitar loop over the top. And you can keep on recording multiple guitar loops after that. Guitar loops can be rhythm or lead or whatever.
I have no experience with her band-in-a-box type pedals to tell you of. If you are interested in going down that route, you can check in the gear - accessories sub-section. There’s this discussion and others too.