the code works when running it as a StackOverflow snippet:
body {
background-color: rgb(148, 68, 223);
margin: 50px;
}
#main {
background-color: rgb(198, 173, 221);
border-radius: 20px;
border: 3px solid rgb(165, 116, 211);
margin: 30px;
}
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pierogi Lover's Personal Site</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
<div id="flex-container">
<div id="main">
<h1>Welcome!</h1>
</div>
</div>
</body>
</html>
thus, it may be an issue with file structure / import.
if both files are in the same folder, then a way to import CSS can be:
<link href="./style.css" rel="stylesheet" type="text/css" media="all">