Big tech companies will have to make changes to their algorithms to comply with new online safety laws.