Honkai: Star Rail 4.2's event "Relic Recon" may help you get the Relics you need for a character
Let's hope this time RNG is kind
Get a character, level up the character, build the character, then test them out in battle. This is always the gameplay loop when you get a new unit in the game. In a live service game, this is always time-consuming since they would always gatekeep you through an energy system and cruel RNG.
In Honkai: Star Rail, the developer has removed a ton of obstacles when it comes to collecting Relics. They have an item where you can choose the main attribute of a Relic really early on, and they also introduce an item where you can choose sub-stats and even reroll it later. Additionally, HSR even shows the "hidden" sub-stat of a Relic that doesn't have all of them open.
All this makes Relic farming far easier, but there's still one more RNG to fight with: Relic level-up. It doesn't matter if you have a Relic with the correct main attribute and three wonderful sub-stats; if, upon leveling up, the Relic upgrades that one useless sub-stat.
For that, an event like Relic Recon is highly welcomed.

In the Relic Recon event, you can get up to six 5-star max-level Relics for different slots. All of them will come with four sub-stats, so you can get the maximum sub-stat value.
This isn't the first time HoYoverse has released Relic Recon for Honkai: Star Rail. And while it potentially gives you what you need, you'll still have to face some degree of RNG, so don't put all your hopes into it.
Additionally, you'll have to be active to get the "Access Card" item needed to make the Relics. Considering version 4.2 also has HSR's anniversary event, it's a good idea to do your dailies, at least until the version is over.
Honkai: Star Rail 4.2 will run up until May 31 or June 1, depending on your time zone, so you have a little less than six weeks to complete the event.