Plastic shopping bags are not free anymore in Japan since 01 July 2020. Therefore you need to bring your own bag or you have to pay for the bag. May be you think it applies to supermarkets or convenience stores, but also at stores which do not sell groceries.
It is not common in Japan to use plastic shopping bags twice or more. Therefore many people bring their own bags; reusable shopping bags. A lot of stores now sell their own reusable shopping bags. Not only the supermarkets but also other types of store. These bags are also sold as souvenirs too.
Anyway, you should bring a reusable shopping bag with you from your home or buy a bag at the first store which you shopped in Japan. Bags are usually not placed at the cashier, therefore you need to choose it before approaching the cashier. There are many types and shapes of bags. If you traveling, may be better to buy a foldable one which you can carry all the time.