I was watching some youtube videos about heating, and somehow got the point of exothermic and endothermic reactions, I know that negative energy change in a reaction means the reaction is exothermic, and that a positive is endothermic, but what I do not understand is, if internal energy means the sum of the average kinetic energy of the particles + the potential energy between their bonds, if an endothermic reaction means it's taking in heat from the surrounding, and making bonds, doesn't making bonds take energy and therefore would mean it's losing energy, and if it's taking in heat from the surrounding, how is it getting colder when it would make more sense (to me) for it to get hotter, sorry if this is a dumb question but I seem to struggle to understand it, also feel free to correct any mistakes I've made in my statements as I'm not 100% on all of this.