JSFiddle - React, Tailwind, and code Playground

HTML

<div class="block">
  <div class="text">AI</div>
</div>
<div class="block2">
  <div class="block2-in">
    <div class="text">AI</div>
  </div>
</div>

CSS

body {
  background: yellow;
  font-family: sans-serif;
  display: flex;
}
.block {
  width: 100px;
  height: 100px;
  border: 3px solid transparent;
  border-image: linear-gradient(to right, #bb7cd7, #3507b8);
  border-image-slice: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
}

.block2 {
  width: 100px;
  height: 100px;
  background: linear-gradient(to right, #bb7cd7, #3507b8);
  padding: 3px;
  margin: 10px;
  border-radius: 10px;
}
.block2-in{
  border-radius: 8px;
  background: #fff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.text {
  font-size: 50px;
  font-weight: bold;
  width: 100%;
  text-align: center;
  
  background: linear-gradient(to right, #bb7cd7, #3507b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}