Yes installing blackout curtains over your windows can help to keep the heat inside your house and prevent the heat from transferring through the blackout curtains and into the outside air.
I installed black out curtains on windows before to keep the cold air out and it did work but now I have newer more insulated windows that help keep the heat inside better and my heating bills have been reduced as a result and my house is warmer in winter and cooler in summer.