Legislators in the European Union have approved two sweeping digital regulations aimed at tech companies and online businesses. The laws are the most far-reaching efforts by Western countries to rein in big tech in a generation.